Server.URLEncode and potentially dangerous string

V

veenakj

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
 
R

Rob Schieber

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top