Click here to Skip to main content
15,890,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Professionals,

We are using an ASP.net 2.0 Web Service in which there are some SOAP function calls and these remote functions return html strings which contain '>', '<' characters and many other special characters.

The Web service has been extensively used for many years now and only lately we get the "A potentially dangerous Request.Form value was detected from the client" exception.

We have googled and figured out the reason and also the proposed solutions that we need to put the validdateRequest='false' inside the Web.config, or include this in the @Page directive.

We tried the Web.config solution and it never worked out for us. As for the @Page directive, since this is an .asmx file we are not sure where to include this.


Please Help us with a solution.

Thanks in Advance.
Posted
Comments
Priya-Kiko 25-Apr-14 6:21am    
We tried it and got this error while building :

Unrecognized attribute 'requestValidationMode'. Note that attribute names are case-sensitive.
Try to encode and decode the HTML strings while sending and receiving respectively.
Priya-Kiko 26-Apr-14 6:54am    
Thanks a million !

It worked very well.
Most welcome. :)

Please accept the answer I have added.

Thanks,
Tadit
Priya-Kiko 28-Apr-14 2:41am    
Thanks Tadit, I have accepted this as solution gladly. :)

1 solution

Try to encode and decode the HTML strings while sending and receiving respectively.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900