This project is read-only.

Cannot Save Existing Posts

Topics: ASP.NET 2.0
Jul 8, 2010 at 4:45 AM

After editing an existing post on live server, I can no longer save changes. Getting the following:


500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.



Jul 8, 2010 at 4:30 PM

Looks like you either have errors in HTML you edited, mismatching tags for example and it breaks page or you are using XML provider and don't have write permissions on app_data folder so it can't save your changes.

Jul 9, 2010 at 6:58 PM

 I'm using the SQL Server provider. It's also happening on every post I try to save, so it's probably not bad markup?

Jul 11, 2010 at 12:49 AM

What version of BE are you using?  If you haven't already, I would change the customErrors tag in the web.config file to the following so you will hopefully get an error message with details.

<customErrors mode="Off">

If you're using BE 1.6 or later, there's an Application_Error() error handler is the Global.asax file (in the root folder).  If you're using BE 1.6 or later, you could try temporarily removing this error handler to see if it makes any difference.

Jul 11, 2010 at 4:58 PM

I changed the CustomErrors mode setting to Off but still got the same 500 error.

I'm using version

I'm in the middle of a re-design of my blog at the moment and will try the Application_Error() route if it occurs again.

What's really weird is that it's a 500 error and it was working fine the last time I published/edited/saved a new blog post two weeks ago and nothing had been deployed since.


I tried it in a browser on the server and got the following:

Error Details:
Url :

Raw Url : /admin/Pages/Add_entry.aspx?id=5acf248b-52f2-48a0-b865-9cb03dec0574

Message : A potentially dangerous Request.Form value was detected from the client (ctl00$cphAdmin$txtContent$TinyMCE1$txtContent="

Source : System.Web

StackTrace : at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)

at System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection)

at System.Web.HttpRequest.get_Form()

at System.Web.HttpRequest.get_Item(String key)

at BlogEngine.Core.Web.HttpModules.CompressionModule.context_PostReleaseRequestState(Object sender, EventArgs e) in D:\Projects\Be-1610\BlogEngine\DotNetSlave.BusinessLogic\Web\HttpModules\CompressionModule.cs:line 62

at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

TargetSite : Void ValidateString(System.String, System.String, System.Web.Util.RequestValidationSource)

Jul 11, 2010 at 11:32 PM
Edited Jul 12, 2010 at 12:00 AM

You may have the ASP.NET version for your site's application pool in IIS set at .NET 4.0.  If possible, change it to 2.0 (best option).  If you need to leave it at 4.0, then try adding the following into the <system.web> section in the web.config file:

<httpRuntime requestValidationMode="2.0" />

EDIT:  There's already an <httpRuntime> element in the BE web.config file.  So if you remain at .NET 4.0 (if you're at 4.0), then you would just want to add requestValidationMode="2.0" as a new attribute to the existing <httpRuntime> tag.

Jul 12, 2010 at 1:45 AM

Duh! That was it... thanks Ben :-)