For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > September 2005 > Server.URLEncode and potentially dangerous string









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Server.URLEncode and potentially dangerous string
veenakj@gmail.com

2005-09-30, 6:59 pm

Hi

Code snippet
--------------
strErrMsg = "Could not find a part of the path
\"C:\\Temp\\data\\Test.xml\"." }

Server.Transfer("Message.aspx?errormsg=" + Server.UrlEncode(lsErrMsg));
---------------

I'm getting "potentially dangerous Request.Form value was detected
from the client " error message

I browses several sites and found people discuusing abt < and >
characters. But in my above string i do not have any of that
characters.

What is potentially dangerous string in the above string.
What is the solution.
Please let me know

Thanks
Veena

Rob Schieber

2005-09-30, 6:59 pm

veenakj@gmail.com wrote:
> Hi
>
> Code snippet
> --------------
> strErrMsg = "Could not find a part of the path
> \"C:\\Temp\\data\\Test.xml\"." }
>
> Server.Transfer("Message.aspx?errormsg=" + Server.UrlEncode(lsErrMsg));
> ---------------
>
> I'm getting "potentially dangerous Request.Form value was detected
> from the client " error message
>
> I browses several sites and found people discuusing abt < and >
> characters. But in my above string i do not have any of that
> characters.
>
> What is potentially dangerous string in the above string.
> What is the solution.
> Please let me know
>
> Thanks
> Veena
>


This is basically a pre-emptive attempt by IIS to prevent cross-site
scripting attacks, buffer-overflows etc... In the past IIS was riddled
with these types of holes. My guess is that the number of backslashes
and periods is causing IIS to think that someone is trying to post
malicious code. You can turn this off by setting
validateRequest="false". For your page.

--
Rob Schieber
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com