Error when updating pages

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.
8/9/2012 1:54:00 PM
Gravatar
Total Posts 4

Error when updating pages

I am getting this error when ever I try to update a page:

Server Error in '/' Application.

A potentially dangerous Request.Form value was detected from the client (ctl00$mainContent$edContentinnerEditor="<table align="center...").

If more info is needed i can post the call stack, etc.

Thanks

8/9/2012 2:08:31 PM
Gravatar
Total Posts 4

Re: Error when updating pages

Operating System: Windows Server 2003

Database Platform : SQL 2005

MojoPortal Version: 2.3.6.6

Edit/Update Content on pages. eg. a name change (married), after modifying name and then the update button it generates the following:

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$edContentinnerEditor="<table border="1" ce...").
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.

 

8/9/2012 2:15:57 PM
Gravatar
Total Posts 18439

Re: Error when updating pages

Make sure you have this in Web.config:

<pages validateRequest="false" enableViewStateMac="false" ...

<httpRuntime requestValidationMode="2.0" ...

Hope that helps,

Joe

8/9/2012 3:19:34 PM
Gravatar
Total Posts 4

Re: Error when updating pages

Thank You!

That worked.

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