web-dev-qa-db-ja.com

IIS HTTPエラーで物理パスを非表示

IIS server ..から以下の物理パスを隠すことは可能ですか?

誰かがブラウザのエラー発生器の下にそのときフォルダ名のあるURLを入力しようとすると:

例: https:// MyDomainAddress/JS

HTTP Error

4
BGS

タグを調整する必要がありました:

<httpErrors errorMode="DetailedLocalOnly" />

これは「system.webserver」タグ内にあります。鉱山は以前「詳細」に設定されていました

https://docs.Microsoft.com/en-us/iis/configuration/system.webserver/httperrors/

2
archangel76

カスタムエラーページの作成に関する限り、web.config.xmlを変更できます。

<!--  CUSTOM ERROR MESSAGES
      Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
      Add <error> tags for each of the errors you want to handle.

      "On" Always display custom (friendly) messages.
      "Off" Always display detailed ASP.NET error information.
      "RemoteOnly" Display custom (friendly) messages only to users not running
       on the local Web server. This setting is recommended for security purposes, so
       that you do not display application detail information to remote clients.
-->
    <customErrors mode="RemoteOnly"/>

リファレンス: https://docs.Microsoft.com/en-us/iis/configuration/system.webserver/httperrors/

1
Chris

特定の組み込みハンドラーによって処理されるため、その詳細エラーページを編集する方法はありません。ただし、これに対処する正しい方法は、他の人が述べたように、errorModeを「DetailedLocalOnly」に変更することです。これにより、「ローカル」ユーザー(つまり、IISと同じシステムで実行されているブラウザ)にこれらの詳細なエラーページのみが表示されます。サーバーから発信された要求についてこのタイプの情報を収集する必要がある場合は、FREBトレース内でこの情報のほとんどを確認することもできます。

詳細: https://docs.Microsoft.com/en-us/iis/configuration/system.webserver/httperrors/https://docs.Microsoft.com/en- us/iis/troubleshoot/diagnosing-http-errors/how-to-use-http-detailed-errors-in-iis

0
Rich-Lang