Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
10/21/2010 6:55:42 AM
Gravatar
Total Posts 9

Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

After a painful upgrade from version 2.3.1.9 to 2.3.5.4 everything is finally working, however, it is not possible to edit or add blog articles.  It IS possible to edit page layout, but not the contents.  Each time we try to edit an article the following error is displayed in the edit section: HTTP Error 404 - File or Directory not found.  I have checked and all the files appear to be there and security is set correctly.  I need to get this fixed fairly urgently.  Can anyone help?  Thanks in advance.

Platform: OS Windows 2003 Server SP2

Client : Windows XP SP3 and Vista SP1 with IE8/9

Database: Microsoft SQL Server 2005 SP3

 

 

 

 

 

 

10/21/2010 7:12:01 AM
Gravatar
Total Posts 18439

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

what is the url of the file that is not found?

did you use the new Web.config as you should?

do you have all windows updates applied?

are you seeing any other related errors in the mojoportal log? ( see basic troubleshooting)

10/21/2010 7:42:50 AM
Gravatar
Total Posts 9

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

There are couple of other things broken, which may be related and yield clues to what is wrong:  the search and clear log functions do not work.  Both result in the "We're sorry but a server error has occurred while trying to process your request ...etc" message.

The url of the file varies, as this occurs for every attempt to use the edit link on every page. The new web.config file is in use and Windows is fully up to date.

Mojoportal System Log only shows an older error:

2010-10-13 10:09:24,937 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
System.IndexOutOfRangeException: DisableDbAuth
at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
at System.Data.SqlClient.SqlDataReader.get_Item(String name)
at mojoPortal.Business.SiteSettings.LoadSiteSettings(IDataReader reader)
at mojoPortal.Business.SiteSettings.GetSiteSettings(String hostName)
at mojoPortal.Business.SiteSettings..ctor(String hostName)
at mojoPortal.Business.WebHelpers.CacheHelper.LoadSiteSettings()

mojoPortal Version 2.3.5.4 MSSQL
Operating System Microsoft Windows NT 5.2.3790 Service Pack 2 ASP.NET Version v4.0.30319 Running in Full Trust Server Time Zone Eastern Daylight Time Server Local Time (GMT -4) 10/21/2010 8:18:27 AM Greenwich Mean Time (GMT/UTC) 10/21/2010 12:18:27 PM Feature Versions Feature Schema Version blog 0.0.1.9 contactform 0.0.0.5 eventcalendar 0.0.0.5 feed-manager 0.0.0.9 forums 0.0.1.7 imagegallery 0.0.0.7 linksmodule 0.0.0.7 pollfeature-byChristianFredh 0.0.0.5 sharedfiles 0.0.0.9 STS_EventCalendar 0.0.3.1 surveyfeature 0.0.1.7 webstore 0.0.6.9

10/21/2010 8:15:41 AM
Gravatar
Total Posts 18439

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

Did you clear the log? Errors like that are expected to be logged when you upgrade until all the db scripts have run.

That error is from 2010-10-13, please clear the log then produce the problem then see if any new errors are in the log. If you are seeing this message "We're sorry but a server error has occurred while trying to process your request ..." then it should be logging an error.

If file system permissions changed and it cannot write to the mojoportal log file then that is a configuration problem and the same problem can cause other errors such as the one you are experiencing, you may need to check the windows application log for errors that are not writing to the mojoportal log. and check file system permissions on the /Data folder it needs to have full control write permissions on that folder and all child folders and files. 

Hope it helps,

Joe

10/21/2010 9:05:27 AM
Gravatar
Total Posts 9

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

I am unable to clear the log (message: We're sorry but a server error has occurred while trying to process your request ..etc).  I tried rerunning the application after recycling IIS, the web app, giving the Everyone group Full Control on the Data folder (as a test) and still get the same result.  The web server event viewer Application Log does not log any related errors.

10/21/2010 9:12:28 AM
Gravatar
Total Posts 18439

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

That confirms that file permissions are not correct otherwise it would clear the log. File system permissions are the problem causing the issues you are experiencing. Everyone group is not who needs permissions. The user that is the identity on your application pool is the user that needs permissions. Full control is needed for both /Data and /App_Data

These errors should be logged in application log, but in any case you can disable the friendly error as indicated in the basic troubleshooting document to find out what the real error is. 

Hope it helps,

Joe

10/21/2010 10:52:45 AM
Gravatar
Total Posts 9

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

Joe,

I have tried numerous permissions settings, but these do not appear to affect the problem.  When turning off custom errors, I did come up with some potentially useful information:

When trying to clear the Mojoportal system log I get:

+++++++++++++++++++++++++++++++++++++

Server Error in '/' Application.

A potentially dangerous Request.Form value was detected from the client (ctl00$mainContent$txtLog="...erEditor="<p><style type="text...").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. To allow pages to override application request validation settings, set the requestValidationMode attribute in the httpRuntime configuration section to requestValidationMode="2.0". Example: <httpRuntime requestValidationMode="2.0" />. After setting this value, you can then disable request validation by setting validateRequest="false" in the Page directive or in the <pages> configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. For more information, see http://go.microsoft.com/fwlink/?LinkId=153133.

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (ctl00$mainContent$txtLog="...erEditor="<p><style type="text...").

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (ctl00$mainContent$txtLog="...erEditor="<p><style type="text...").]
System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +8730676
System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) +122
System.Web.HttpRequest.get_Form() +114
System.Web.HttpRequest.get_HasForm() +8896047
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
System.Web.UI.Page.DeterminePostBackMode() +69
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253
System.Web.UI.Page.ProcessRequest() +78
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.admin_serverlog_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

**********************************************************************************************************

When I try to use the Search link, the following happens:

++++++++++++++++++++++++++++++++++++++

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
mojoPortal.Web.UI.BingSearchControl.OnInit(EventArgs e) +126
System.Web.UI.Control.InitRecursive(Control namingContainer) +140
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Control.InitRecursive(Control namingContainer) +311
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480

 


 

10/21/2010 11:09:32 AM
Gravatar
Total Posts 18439

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

The first error should not happen because we already have this in the Web.config file that ships with mojoPortal

<httpRuntime requestValidationMode="2.0" ...

make sure you have it in yours.

the second error I think can only be caused if you did not upload all the files or if some of them did not make it when you tried to upload.

I would re-deploy the files.

Also make sure you are using the .net 4 package of mojoPortal not the .NET 3.5 version.

10/22/2010 2:00:52 PM
Gravatar
Total Posts 9

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

After about 3-4 days I finally got things working.  I resolved the problem by manually copying over all the wwwroot files and folders into the appropriate folders and subfolders in the website directory.  Things magically started working after that.  I suspect that the first time I ran setup, the permissions on the Data folder (and possibly others) were too restrictive.  The readme.txt instructions state that to make sure that the site is completely writable by the web process.  This assumes that you know what the web process is and simply having domain admin access is not enough.  At this point I am still not sure what the 'web process' is.  Is it the ASP.NET account or the IUSR_Servername or the NETWORK SERVICE or maybe the IIS_WPG account?

The issue could have been avoided with clearer instructions.  Nonetheless, thanks for your assistance.

10/23/2010 7:04:16 AM
Gravatar
Total Posts 18439

Re: Can no longer edit or add blogs after Mojoportal (SQL) upgrade (URGENT)

Thanks I'll add a note about that to the readme file. The Web Process runs in the context of the user that is configured as the identity on the application pool in IIS. It can vary who this user is because it can be changed and the defaults vary by operating system or IIS version. In IIS 6/win 2003 IIS_WPG was the default, in early versions of IIS 7 it changed to NETWORK SERVICE but I think it is different again in IIS 7.5. In any case you can find it by inspecting the settings of the application pool that is configured for your site. Whatever the user is on the application pool, that is the user who needs file system  permissions.

In any case, glad you got it working.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.