Web service does not accept input

Posted by Germstorm on Stack Overflow See other posts from Stack Overflow or by Germstorm
Published on 2010-06-18T14:51:48Z Indexed on 2010/06/18 14:53 UTC
Read the original article Hit count: 387

Filed under:
|

I am working on a simple .Net 4.0 webservice. I created one method, which accepts a string input. I run the project in Debug mode so a page opens in my browser where I can enter an input and invoke the method of the service. Unfortunately I am getting the following error:

System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (xmlData="<?xml version="1.0" ...").
   at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.get_Form()
   at System.Web.Services.Protocols.HtmlFormParameterReader.Read(HttpRequest request)
   at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

I tried adding to the web.config.

What can I do?

© Stack Overflow or respective owner

Related posts about webservice

Related posts about dotnet