我在IIS 7.0中部署了一个WebService。 如果我使用IPv4绑定访问该WebService它可以工作,我可以看到WSDL。但是,使用IPv6绑定访问它会返回System.UriFormatException:无效的URI:无法解析主机名。
[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页面就可以了。
有什么建议吗?
由于
答案 0 :(得分:0)
尝试将.Net Framework升级到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
http:// [fe11::b111:327b:28ef:ee9e]/WebServicePath/MyService.asmx //抛出异常
现在,在将.net framework 4.5.1升级到4.6(RC)
之后,这已得到修复