Home > ASP.Net, BlogEngine.Net > BlogEngine.NET with ASP.NET 4.0

BlogEngine.NET with ASP.NET 4.0

Today i setup BlogEngine.Net 1.6.1 with ASP.Net 4.0 for the first time. Initial setup was smooth and there was no problem in the setup.

When i tried to add a new post, BlogEngine.Net threw following exception:

Error Details:

Raw Url : /BE/admin/Pages/Add_entry.aspx
Message : A potentially dangerous Request.Form value was detected from the client (ctl00$cphAdmin$txtContent$TinyMCE1$txtContent=”

Prior to ASP.Net 4.0 this exception was only thrown if HTML tags are entered in an input field and page level validateRequest is set to true. I checked the source code for “/admin/Pages/Add_entry.aspx” and verified that validateRequest  was already set to “false” – I also added the validateRequest=”false” to web.config but the error was still there.

By searching for such errors with ASP.Net 4.0, i was able to find a solution at http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770147 – By setting up requestValidationMode to “2.0”, the request validation errors were removed.

<httpRuntime requestValidationMode="2.0" />
This URL also lists other breaking changes in ASP.Net 4.0:
  1. October 11, 2010 at 08:43

    Thanks for your information!

    I’ve being bothered for a while!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: