Page 1 of 1

7.0.7 error: A potentially dangerous Request.Path value

Posted: Mon Aug 22, 2011 4:21 pm
by napacabs
Get this error frequently in error log, after upgrading to 7.0.7 build 14588, asp.net framework 4 : A potentially dangerous Request.Path value was detected from the client (:). With the URL being http://www.Napacabs.com/http://www.Napa ... kPage.aspx

Everything else runs great, any ideas on how to eliminate/fix this error?

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Mon Aug 22, 2011 8:52 pm
by compunerdy
If I remember correctly.. These should just go away after a little while or try and reboot the server.

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Thu Aug 25, 2011 12:11 pm
by napacabs
Thanks Tim, rebooted server but still get errors.

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Fri Sep 02, 2011 9:55 am
by AbleMods
This happens when ASP.Net 4.0 is used to run your site and RequestValidation is not set on every single page in the store.

Rather than change every page, just make this change to the web.config file in the root of your store:

Code: Select all

<httpRuntime requestValidationMode="2.0"/>
If you already have a <httpRuntime> tag in your web.config, simply add the new parameter to your existing tag.

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Sun Sep 04, 2011 11:51 am
by napacabs
Joe, thank you for responding.

I currently have this in my web.config <httpRuntime maxRequestLength="4096" requestValidationMode="2.0"/>, do you think the Parameter maxRequestLength="4096" is the issue?

Also, I'm running IIS6.0, does that require any changes to the web.config?

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Tue Sep 06, 2011 6:57 am
by AbleMods
No the MaxRequestLength wouldn't throw the error you're seeing. I don't think the version of IIS matters either - from what I've read, it's an issue specific to .Net 4.0.

Is it just one page throwing the error?

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Tue Sep 06, 2011 11:22 am
by napacabs
Joe, thanks for responding. No it's the same 4 pages below:

http://www.napacabs.com/New_wine_arrivals.aspx
http://www.napacabs.com/Search.aspx?k=WS+9
http://www.napacabs.com/Red-Wine-C1.aspx
http://www.napacabs.com/Two-Top-Sellers ... 10475.aspx

I reviewed these pages but not sure of what type of code or characters to clean-up.

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Tue Sep 06, 2011 11:56 am
by AbleMods
Ok so it's a mix of static pages and product pages. Was hoping it was simpler than that :)

And your 100% certain you've already got the pagevalidation parameter in your web.config file?

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Tue Sep 06, 2011 12:44 pm
by napacabs
Yes have this <httpRuntime maxRequestLength="4096" requestValidationMode="2.0"/>.

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Tue Sep 06, 2011 12:53 pm
by AbleMods
Try adding this line immediately below the httpruntime tag

Code: Select all

<pages validateRequest="false" />
See if that solves it for you.....

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Wed Sep 07, 2011 1:22 am
by napacabs
Joe I added the tag added above but unfortunately, get this server error:

Server Error in '/' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Sections must only appear once per config file. See the help topic <location> for exceptions.
Source Error:

Line 125: <anonymousIdentification enabled="true" cookieName="AC7.ASPXANONYMOUS" cookieTimeout="1440"/>
Line 126: <httpRuntime maxRequestLength="4096" requestValidationMode="2.0"/>
Line 127: <pages validateRequest="false" />
Line 128: <globalization culture="en-US" uiCulture="en-US"/>
Line 129: </system.web>

Source File: D:\inetpub\wwwroot\napacabs\web.config Line: 127
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Any suggestions?

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Wed Sep 07, 2011 7:13 am
by AbleMods
Well that means you've already got a <pages> section in your web.config, so take out the one I told you to add.

Tom, I'm all out of ideas. I had the exact same errors you are having with my site. All I had to do was add the requestvalidationmode and it fixed it. I don't know what else to try at this point :(

Re: 7.0.7 error: A potentially dangerous Request.Path value

Posted: Fri Sep 09, 2011 7:25 am
by jmestep
If it is only particular pages, try taking out the content one section at a time- like take the description content out, see if you get an error, etc.