R
Richard Hallgren
Hi,
I've set up Role and Membership provider on a SQL Server 2000. Everything
works fine when I run it from localhost (with the connection string pointing
to the remote SQL Server). However when I put the asp.net solution on the
production server the provider related functionality will not work. It uses
the same SQL Server as I've got working when running from localhost.
My conclusion is that I can't have anything to do with the database setup as
I use the same database as I do testing from localhost, and because I do
other database CRUD actions, not related to the providers. I just seems
that its the provider functionality that stops working.
What could it be? I've run out of ideas. Please have a look at the
web.config at the bottom of this message and give me a few hints. Could it
have something to do with the session setup?
Thanks in advance
Richard
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="Personal" connectionString="Data Source=XXX.XXX.XXX.XX;Initial
Catalog=XXX;Initial Catalog=XXX;User Id=XXX;Password=XXX;"/>
</connectionStrings>
<system.web>
<roleManager enabled="true"
defaultProvider="CustomizedRoleProvider">
<providers>
<add name="CustomizedRoleProvider"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="Personal" />
</providers>
</roleManager>
<membership defaultProvider="CustomizedMembershipProvider">
<providers>
<add name="CustomizedMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="Personal"
minRequiredNonalphanumericCharacters="0"
minRequiredPasswordLength="4"
enablePasswordRetrieval="false"
requiresUniqueEmail="false"
requiresQuestionAndAnswer="false"
/>
</providers>
</membership>
<pages />
<customErrors mode="Off"/>
<compilation debug="true"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" protection="Validation" timeout="300"/>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider" description="SiteMap provider which reads
in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>
</system.web>
<location path="Admin">
<system.web>
<authorization>
<allow roles="Administrators"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
</configuration>
I've set up Role and Membership provider on a SQL Server 2000. Everything
works fine when I run it from localhost (with the connection string pointing
to the remote SQL Server). However when I put the asp.net solution on the
production server the provider related functionality will not work. It uses
the same SQL Server as I've got working when running from localhost.
My conclusion is that I can't have anything to do with the database setup as
I use the same database as I do testing from localhost, and because I do
other database CRUD actions, not related to the providers. I just seems
that its the provider functionality that stops working.
What could it be? I've run out of ideas. Please have a look at the
web.config at the bottom of this message and give me a few hints. Could it
have something to do with the session setup?
Thanks in advance
Richard
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="Personal" connectionString="Data Source=XXX.XXX.XXX.XX;Initial
Catalog=XXX;Initial Catalog=XXX;User Id=XXX;Password=XXX;"/>
</connectionStrings>
<system.web>
<roleManager enabled="true"
defaultProvider="CustomizedRoleProvider">
<providers>
<add name="CustomizedRoleProvider"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="Personal" />
</providers>
</roleManager>
<membership defaultProvider="CustomizedMembershipProvider">
<providers>
<add name="CustomizedMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="Personal"
minRequiredNonalphanumericCharacters="0"
minRequiredPasswordLength="4"
enablePasswordRetrieval="false"
requiresUniqueEmail="false"
requiresQuestionAndAnswer="false"
/>
</providers>
</membership>
<pages />
<customErrors mode="Off"/>
<compilation debug="true"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" protection="Validation" timeout="300"/>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider" description="SiteMap provider which reads
in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>
</system.web>
<location path="Admin">
<system.web>
<authorization>
<allow roles="Administrators"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
</configuration>