IIS forms authentication & Login controls

Discussion in 'ASP .Net Web Controls' started by Ashkan Daie, Jul 18, 2006.

  1. Ashkan Daie

    Ashkan Daie Guest

    Hi All,

    When using forms authentication with IIS 6.0, I can create a user and log in
    the user. But the LoginStatus control states that the user is logged out.

    When running the same app using the file system and the Visual Studio web
    server the LoginStatus page functions properly by displaying the LoggedIn
    template.

    Any help is appreciated.

    System Settings:
    Windows 2003 R2 EE w/ all patches

    IIS Settings:
    Anonymous & Integrated Security

    web.config:

    <?xml version="1.0"?>
    <configuration>
    <connectionStrings>
    <clear/>
    <add name="SqlConnectionString" connectionString="Data
    Source=(local);Initial Catalog=aspnet;Integrated Security=True;Application
    Name=aspnet"
    providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.web>
    <trace enabled="true" mostRecent="true" />

    <authentication mode="Forms">
    <forms name=".ASPXAUTH" loginUrl="Login.aspx" protection="All"
    timeout="30" path="/" requireSSL="false" slidingExpiration="true">
    <credentials passwordFormat="SHA1" />
    </forms>
    </authentication>

    <compilation debug="true" defaultLanguage="C#">
    <assemblies>
    <add assembly="System.Management, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Data.OracleClient, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <add assembly="System.Configuration.Install, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=B77A5C561934E089" />
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.DirectoryServices, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=B77A5C561934E089" />
    <add assembly="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Runtime.Remoting, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <add assembly="Microsoft.Build.Utilities, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="Microsoft.Build.Framework, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    </assemblies>
    </compilation>
    <membership defaultProvider="SqlMembershipProvider"
    userIsOnlineTimeWindow="15">
    <providers>
    <clear />
    <add name="SqlMembershipProvider"
    type="System.Web.Security.SqlMembershipProvider"
    connectionStringName="SqlConnectionString" applicationName="aspnet"
    enablePasswordRetrieval="false" enablePasswordReset="true"
    requiresQuestionAndAnswer="true" requiresUniqueEmail="true"
    passwordFormat="Hashed" minRequiredPasswordLength="4"
    minRequiredNonalphanumericCharacters="0" maxInvalidPasswordAttempts="5"
    passwordAttemptWindow="10" />
    </providers>
    </membership>
    <roleManager defaultProvider="SqlRoleProvider" enabled="true"
    cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="30"
    cookiePath="/" cookieRequireSSL="true" cookieSlidingExpiration="true"
    cookieProtection="All">
    <providers>
    <clear />
    <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider"
    connectionStringName="SqlConnectionString" applicationName="aspnet" />
    </providers>
    </roleManager>
    <profile defaultProvider="SqlProfileProvider">
    <providers>
    <clear />
    <add name="SqlProfileProvider"
    type="System.Web.Profile.SqlProfileProvider"
    connectionStringName="SqlConnectionString" applicationName="aspnet" />
    </providers>
    <properties>
    <add name="FirstName" />
    <add name="LastName" />
    <add name="Address" />
    <add name="City" />
    <add name="StateCode" />
    <add name="ZipCode" />
    <add name="Gender" />
    <add name="Age" type="System.Int32" />
    </properties>
    </profile>
    </system.web>
    </configuration>
     
    Ashkan Daie, Jul 18, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ashkan Daie

    IIS forms authentication & Login controls

    Ashkan Daie, Jul 18, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    348
    Ashkan Daie
    Jul 18, 2006
  2. Pascal Blanchard
    Replies:
    0
    Views:
    252
    Pascal Blanchard
    Aug 17, 2004
  3. Pascal Blanchard
    Replies:
    1
    Views:
    284
    Pascal Blanchard
    Aug 18, 2004
  4. Keltex
    Replies:
    1
    Views:
    406
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  5. Ashkan Daie

    IIS forms authentication & Login controls

    Ashkan Daie, Jul 18, 2006, in forum: ASP .Net Security
    Replies:
    0
    Views:
    104
    Ashkan Daie
    Jul 18, 2006
Loading...

Share This Page