首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >.NET 4.0 WebServices和IPv6

.NET 4.0 WebServices和IPv6
EN

Stack Overflow用户
提问于 2012-08-30 21:29:00
回答 1查看 595关注 0票数 1

我在IIS7.0中部署了一个WebService。如果我使用IPv4绑定访问该WebService,它将正常工作,我可以看到该WSDL。但是,使用IPv6绑定访问它会返回一个System.UriFormatException: Invalid URI:无法解析主机名。

代码语言:javascript
运行
复制
[UriFormatException: Invalid URI: The hostname could not be parsed.]
   System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) +7955439
   System.Web.Services.Protocols.DocumentationServerType..ctor(Type type, String uri) +75
   System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +322
   System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +160

[InvalidOperationException: Unable to handle request.]
   System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +800924
   System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +302

[InvalidOperationException: Failed to handle request.]
   System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +731240
   System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +308
   System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +89
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +608
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +193
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371

如果我访问一个普通的ASP页面,它可以工作。

有什么建议吗?

谢谢

EN

回答 1

Stack Overflow用户

发布于 2015-06-04 22:46:51

尝试将.Net框架升级到4.6

https://www.microsoft.com/en-us/download/details.aspx?id=46854

我们遇到了同样的问题,我们可以使用'IPv6 url‘来访问直到web服务目录级别,但在访问.asmx时抛出了异常

http:// fe11::b111:327b:28ef:ee9e/WebServicePath //Works

// fe11::b111:327b:28ef:ee9e/WebServicePath/MyService.asmx //抛出异常

将.net framework 4.5.1升级到4.6(RC)后,此问题现已修复

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12198013

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档