0
我有一個WCF客戶端在不同的項目中調用ASP.NET Web服務。我收到以下錯誤信息:使用WCF調用ASP.NET Web服務時出現異常
服務器無法處理服務器無法識別的HTTP標頭的SOAPAction的http://localhost/IMyWebService/MeMethod
Web服務代碼值:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
[System.Web.Script.Services.ScriptService]
public class MyWebService : System.Web.Services.WebService, IMyWebService
{
[WebMethod]
public string MyMethod() {return "";}
}
public interface IMyWebService
{
string MyMethod();
}
WCF客戶端代碼:
[ServiceContract]
public interface IMyWCFService
{
[OperationContractAttribute(Action = "http://localhost/IMyWebService/MeMethod")]
string MyMethod();
}
有誰知道問題是什麼。
感謝