How can the error 'Client found response content type of 'text/html'.. be interpreted

后端 未结 9 1532
深忆病人
深忆病人 2020-12-18 17:54

I\'m using C# and connecting to a WebService via an auto-generated C# proxy object. The method I\'m calling can be long running, and sometimes times out. I get different err

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-18 18:24

    If you are using .NET version 4.0. the validateRequestion is turned on by default for all the pages. in previous versions 1.1 and 2.0 it was only for aspx page. You can turn the default validation off. In that case you have to do the due diligence and make sure that the data is clean. Use HtmlEncode. Do the following to turn the validation off

    In the web.config add the following lines for system.web

     
    

    and

     
    

    You can read more about this http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes also http://msdn.microsoft.com/en-us/library/ff649310.aspx

    Hope this helps.

提交回复
热议问题