WEBSERVICE analyzer error message: Failed to create type

1. Problem: WEBSERVICE analyzer error message: Failed to create type
Parser error
Explanation: An error occurred while analyzing the resources required to service this request. Please check the following specific analysis error details and modify the source file appropriately.
Analyzer error message: The type "Service1" could not be created.
Source error:
Line 1:
Source file: /WEB/Service.asmx Line: 1
 
2. Solution:
Add in web.config
<!-Webservice configuration__begin->
<location path="WebServices">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="Client">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<system.web>
 
<webServices>
<protocols>
<add name="HttpPost" />
<add name="HttpGet" />
</protocols>
</webServices>
</system.web>
<!-Webservice configuration__end->


Guess you like

Origin www.cnblogs.com/masonblog/p/12740497.html
Recommended