将标题添加到SOAP请求.NET
我在现有的Visual Studio项目中添加了Web服务参考,因为我不断遇到“丢失的标题”错误,无法执行任何服务方法。
然后,新生成的代理类没有添加标头的方法。有什么方法可以将HTTP标头添加到请求中?
I added a web service reference to my existing Visual Studio project, I not able to execute any of the service methods as i keep getting "missing headers" error.
Then newly generated proxy class doesn't have method to add headers. Is there a way I can add http header to the request?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
覆盖代理类中的方法getwebrequest
然后添加以下代码
Override the method GetWebRequest in the proxy class
Then add below code