A
Ashkan Daie
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>
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>