1

IIS 7.0 に展開された WebService があります。IPv4 バインディングを使用してその WebService にアクセスすると、動作し、WSDL を確認できます。ただし、IPv6 バインディングを使用してアクセスすると、 System.UriFormatException: Invalid URI: The hostname could not 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 ページにアクセスすると機能します。

なにか提案を?

ありがとう

4

1 に答える 1

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 //動作

http:// [fe11::b111:327b:28ef:ee9e]/WebServicePath/MyService.asmx //例外がスローされました

これは、.net Framework 4.5.1 を 4.6(RC) にアップグレードした後に修正されました。

于 2015-06-04T14:46:50.930 に答える