服务器无法处理服务器不承认HTTP头SOAPAction的价值

服务器无法处理服务器不承认HTTP头SOAPAction的价值

本文介绍了服务器无法处理服务器不承认HTTP头SOAPAction的价值:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是例外,当我试图来调用Web服务的方法流:

An exception flows when I was trying to call a method on web service:

System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://localhost:53460/3Development/MyWebService.asmx/GetBasePath.
   at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
   at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

Web服务的命名空间:

The web service's namespace:

[WebService(Namespace = "http://internaltest.temp.us/MyWebService.asmx")]

我做了一些研究,发现了这个异常流入,因为在这个项目中引用的Web服务的命名空间是从服务器Web服务的命名空间的不同,但我试着删除Web引用,并在项目重新添加,但结果还是一样。

I did some research and found out that this exception flows because the web service's namespace referenced in the project was different from the server web service's namespace, but I've tried removing web reference and add it again in the project, but the result was still the same.

我的情况是类似以下文章:

My situation was similar to the below article:

http://bluebones.net/2003/07/server-did-not-recognize-http-header-soapaction/

从文章:

所以基本上Web服务从感动
  到但Web服务的空间
  留校因为没有人改变了它。

问题是:

如何改变Web引用的命名空间?

How to change the namespace of the web reference?

推荐答案

在除了删除和添加Web引用,你可以尝试使用再生代理Wsdl.exe用的建议here,与命名空间一次。希望它能帮助

In addition to removing and adding web-reference, you could try regenerating proxies using wsdl.exe as suggested here, with the namespace again. Hope it helps

这篇关于服务器无法处理服务器不承认HTTP头SOAPAction的价值:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 12:04