第十七步:配置文件的修改,直接替换文件内容即可
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
</webServices>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Methods" value="OPTIONS,POST,GET"/>
<add name="Access-Control-Allow-Headers" value="x-requested-with,content-type"/>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
注意事项
图中所指的地方true 等于debug false等于release
请求的示例地址:https://192.168.110.98/WebService.asmx/HelloWorld
客户端
第一步:微信小程序中代码
第二步:微信小程序结果
有任何问题请关注微信关注Unity科技或者加群584985793,有问必答