Advertisement

07.25.2008 at 05:01PM PDT, ID: 23597090
[x]
Attachment Details

Windows Authentication IIS Settings and Login.aspx ?

Asked by kvnsdr in Programming for ASP.NET

I have a web.config using <authentication mode="Windows"> and a subdirectory of the root named 'admins'. I have the login.aspx page placed in the same directory (admins) as the resticted pages. Also Windows 2003 server IIS has Enable Anonymous Access 'checked'.

Problem: Any page in the 'admins' directory is still directly accessable through IE and does not redirect to the login.aspx page.

I've accomplished this before using Forms Authentication, but cannot get Windows Authentication to work correctly.

[web.config]
<location path="admin">
      <system.web>
            <customErrors mode="Off" />
            <authentication mode="Windows">
                  <forms
                    name=".ASPXAUTH"
                    loginUrl="/admins/login.aspx"
                    defaultUrl="/admins/default.aspx"
                    protection="All"
                    timeout="30"
                    path="/"
                    requireSSL="false"
                    slidingExpiration="true"
                    cookieless="UseDeviceProfile" domain=""
                    enableCrossAppRedirects="false">
                  <credentials passwordFormat="SHA1" />
            </forms>
            <passport redirectUrl="internal" />
      </authentication>
      <roleManager enabled="true" />
            <authorization>
                            <allow roles="Administrators"/>
                  <deny users="*"/>
            </authorization>
      </system.web>
</location>

 Start Free Trial
[+][-]07.25.2008 at 07:54PM PDT, ID: 22093563

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.26.2008 at 07:16AM PDT, ID: 22095131

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.26.2008 at 09:29AM PDT, ID: 22095439

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.26.2008 at 10:27AM PDT, ID: 22095610

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.30.2008 at 07:20AM PDT, ID: 22120661

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Programming for ASP.NET
Sign Up Now!
Solution Provided By: kvnsdr
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906