Azure でホストされている ASP.NET C# アプリのweb.configファイルに次のコードがあります。
<!-- Turn on Custom Errors -->
<!-- Switch the mode to RemoteOnly for Retail/Production -->
<!-- Switch the mode to On for to see error pages in the IDE during development -->
<customErrors mode="On" defaultRedirect="ErrorPage.aspx">
<error statusCode="403" redirect="ErrorPage403.aspx"/>
<error statusCode="404" redirect="ErrorPage404.aspx"/>
</customErrors>
これは、自分のサイト ( http://ipredikt.com/ErrorPage.aspx ) をネイティブにアクセスしたときのエラーに対してはうまく機能しますが、すべてのページが異なる MasterPage を使用する Facebook バージョンのアプリも持っているため、別の URL ( http://ipredikt.com/ErrorPageFB.aspx )。
web.config に次の設定があるかのように、Facebook アプリ モードで実行しているときに、実行時に customError リダイレクト値を変更することは可能ですか。
<customErrors mode="On" defaultRedirect="ErrorPageFB.aspx">
<error statusCode="403" redirect="ErrorPage403FB.apx"/>
<error statusCode="404" redirect="ErrorPage404FB.apx"/>
</customErrors>
Facebook モードで実行されているかどうかを知っているのはアプリ内の個々のページであるため、これを Application スコープで設定できるとは思いません。