WebService求助
开发分布式应用程序时(用企业模板),我把webservices写在webservices层的话
便会出错,以下是错误信息:
如果把webservices独立出来写在另外一个解决方案的话就没问题。
webservices代码是用简单的hello world,应该不是代码问题。
help~~
----------------------
请求因 HTTP 状态 401 失败:Unauthorized。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Net.WebException: 请求因 HTTP 状态 401 失败:Unauthorized。
源错误:
行 35: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/HelloWorld", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
行 36: public string HelloWorld() {
行 37: object[] results = this.Invoke("HelloWorld", new object[0]);
行 38: return ((string)(results[0]));
行 39: }