我在 IIS 7.0 中部署了一个 WebService。如果我使用 IPv4 绑定访问该 WebService,它就可以工作并且我可以看到 WSDL。但是,使用 IPv6 绑定访问它会返回 System.UriFormatException: Invalid URI: The hostname could not be parsed。
[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 页面,它就可以工作。
有什么建议吗?
谢谢