双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

WebService求助

netspy netspy 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
开发分布式应用程序时(用企业模板),我把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: }


...全文
评论 2
收藏 已收藏
分享
返回顶部
netspy
.NET社区 62,274 成员 668,968 内容