トップ回答者
Azure Websites での静的ファイルへのフォーム認証について

質問
-
Azure Websites でフォーム認証を利用しています。
aspxへの認証はうまく機能するのですが,
静的ファイルへの認証が設定できず解決方法を探しています。
ISS7.0でのやり方などをさがしてみましたが,うまくいっておりません。
現在の web.config は下記の通りです。
"common"ディレクトリへの許可はログイン画面のデザイン上の都合で設定しています。
----------------------------------------
<?xml version="1.0"?> <configuration> <system.web> <compilation debug="false" targetFramework="4.0" /> <authentication mode="Forms"> <forms loginUrl="Logon.aspx" name=".ASPXFORMSAUTH" timeout="90"> </forms> </authentication> <authorization> <deny users="?" /> </authorization> </system.web> <location path="common"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> </configuration>
回答
-
下記を追加することで目的の処理が可能となりました。
この手法で何か問題がありましたらご指摘くださると幸いです。
<system.webServer> <modules> <remove name="FormsAuthenticationModule" /> <add name="FormsAuthenticationModule" type="System.Web.Security.FormsAuthenticationModule" /> <remove name="UrlAuthorization" /> <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" /> </modules> </system.webServer>
- 回答としてマーク 星 睦美 2013年10月24日 0:52
すべての返信
-
下記を追加することで目的の処理が可能となりました。
この手法で何か問題がありましたらご指摘くださると幸いです。
<system.webServer> <modules> <remove name="FormsAuthenticationModule" /> <add name="FormsAuthenticationModule" type="System.Web.Security.FormsAuthenticationModule" /> <remove name="UrlAuthorization" /> <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" /> </modules> </system.webServer>
- 回答としてマーク 星 睦美 2013年10月24日 0:52