Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I created a SOAP webservice using VS 2010 and vb.net code. I wanted to send html tags in a single method that's why I added the validation mode to my web.config file:
XML
<httpRuntime requestValidationMode="2.0" />
    <pages validateRequest ="false">

But the problem is that all methods are not secured anymore because validationrequest is set as false for the entire request.

What I have tried:

I made some searches and I found that in .NET 4.5 the ValidateRequestMode property was added, which allows excluding controls from the page global validation. but this property is used for check-boxes or controls ... how can I implement it in my webservice as we are invoking? If I cannot implement it, is there any solution to disable request validation only for one webmethod ?
Posted
Updated 16-Oct-16 20:25pm
v8
Comments
Suvendu Shekhar Giri 17-Oct-16 2:00am    
Try pasting the web config section once again using Improve Question widget.
H.AL 17-Oct-16 2:08am    
Updated

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