1

フォームベースの認証を持つ Web アプリケーションを開発しています。AboutUs と ContactUs ページを除くすべてのページを認証する必要があります。

AboutUs と ContactUs のページ以外はすべて正しく設定しました。認証セクションですべてのユーザーを拒否しているため、顧客が AboutUs および ContactUs ページを閲覧しても、アプリケーションはリダイレクトされます。

構成規則

<authentication mode= "Forms">
<forms name=".ASPXAUTH" loginUrl="Login.aspx" timeout="20" protection="All" slidingExpiration="true" />
</authentication>
<authorization>
<deny users="?" />
</authorization>

承認のためにこれらのページを削除するようにasp.netに指示する方法を教えてください??

ありがとう、マヘシュ

4

1 に答える 1

1

これを試して:

<system.web>
    <authentication mode="Forms" >
        <forms loginUrl="login.aspx" name=".ASPNETAUTH" 
                           protection="None" path="/" timeout="20" >
        </forms>
    </authentication>
<!-- This section denies access to all files in this application except for 
     those that you have not explicitly specified by using another setting. -->
    <authorization>
        <deny users="?" /> 
    </authorization>
</system.web>
<!-- This section gives the unauthenticated user access to the AboutUs.aspx page 
     only. It is located in the same folder as this configuration file. -->
<location path="AboutUs.aspx">
    <system.web>
        <authorization>
             <allow users ="*" />
        </authorization>
    </system.web>
</location>
<!-- This section gives the unauthenticated user access to the ContactUs.aspx 
     page only. It is located in the same folder as this configuration file. -->
<location path="ContactUs.aspx">
    <system.web>
        <authorization>
             <allow users ="*" />
        </authorization>
    </system.web>
</location> 
于 2010-05-13T09:44:08.130 に答える