0
下記のテストシナリオのエラーページにエラーが発生すると、 http://localhost/admin800/testにリダイレクトする必要があります。 http://localhost/admin800/test:ここテストケースhttp:// localhost/testにカスタムエラーページを表示します。 htttp:// localhost/test:
が
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime targetFramework="4.0" />
<customErrors mode="On" defaultRedirect="Error1">
<error statusCode="404" redirect="/admin600/error.aspx"/>
</customErrors>
</system.web>
<system.webServer>
<directoryBrowse enabled="false" />
<httpErrors errorMode="Custom" defaultResponseMode="ExecuteURL" existingResponse="Replace">
<remove statusCode="500" subStatusCode="-1" />
<remove statusCode="404" subStatusCode="-1" />
<remove statusCode="403" subStatusCode="-1" />
<error statusCode="404" path="/admin600/error.aspx" responseMode="ExecuteURL" />
<error statusCode="500" prefixLanguageFilePath="" path="/admin600/error.aspx" responseMode="ExecuteURL" />
<error statusCode="403" path="/admin600/error.aspx" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
は、私はこのweb.configIに追加する必要がどのような追加のコードを知ってみましょうではないから話を聞くのを楽しみにしMVC.LookingでWebアプリケーションプロジェクトでプロジェクトを行っている、私のコードですあなたは一番早い。
ありがとうございます。 ジョージ