2 つの webmethods を持つ単純な webservice があります。
https://localhost/Sub/WS/Dash.asmx/test_error_methodnameXXXXXXXXXXX
ブラウザから上記のリクエストを呼び出すと。次のようなエラーメッセージが表示されます:-
System.InvalidOperationException: test_error_methodnameXXXXXXXXXXX Web サービス メソッド名が無効です。 System.Web.Services.Protocols.HttpServerProtocol.Initialize() で System.Web.Services.Protocols.ServerProtocolFactory.Create (型の種類、HttpContext コンテキスト、HttpRequest 要求、HttpResponse 応答、Boolean & abortProcessing)
次のようにweb.configファイルを使用して回避しようとしました:-
<system.web>
<customErrors mode="On" defaultRedirect="~/Sub/ErrorPage/AppErrors.aspx">
<error statusCode="500" redirect="500.aspx" />
</customErrors>
</system.web>
この場合、リダイレクトは500.aspx ページまたは AppErrors.aspx に対して行われません。モード属性の値を変更すると、変更が行われていることがわかります..
ありがとう。