Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Built-in controls with custom providers (http://www.velocityreviews.com/forums/t777425-built-in-controls-with-custom-providers.html)

John 12-16-2005 08:43 PM

Built-in controls with custom providers
 
Hi

I have created custom membership/role/profile providers as per the
web.config below. My questions are;

1. Have I defined them correctly?

2. How can I make the Login and Create User Wizard controls to use these
providers instead of the standard providers?

Thanks

Regards

web.config follows

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>

<connectionStrings>
<add name="Events" connectionString="Data Source=.\MSSQLSERVER;Integrated
Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Even ts.mdf"
providerName="System.Data.SqlClient"/>
<!--<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data
Source=.\SQLEXPRESS;Integrated Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|aspn etdb.mdf"/>-->
<add name="Membership" connectionString="Data
Source=.\MSSQLSERVER;Integrated Security=True;User
Instance=True;AttachDBFilename=|DataDirectory|Memb ership.mdf"
providerName="System.Data.SqlClient"/>
</connectionStrings>

<system.web>
<compilation debug="true" strict="false" explicit="true"/>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<authentication mode="Forms">
<forms name="LoginAuthCookie" loginUrl="Login.aspx">
<!--<credentials passwordFormat="Clear">
<user name="john" password="password" />
<user name="mike" password="test" />
</credentials>-->
</forms>
</authentication>

<authorization>
<deny users="?" />
</authorization>

<!--<membership>
<providers>
<add connectionStringName="SqlServices"
requiresQuestionAndAnswer="false"
minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0"
name="AspNetSqlProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>-->

<membership>
<providers>
<add name="MembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="Membership" enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="false"
applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />
</providers>
</membership>

<profile>
<providers>
<add name="ProfileProvider" connectionStringName="Membership"
applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</profile>

<roleManager>
<providers>
<add name="RoleProvider" connectionStringName="Membership"
applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="WindowsTokenRoleProvider" applicationName="/"
type="System.Web.Security.WindowsTokenRoleProvider , System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>

</system.web>

<location path="register.aspx">
<system.web>
<authorization>
<allow users="*"></allow>
</authorization>
</system.web>
</location>

</configuration>





All times are GMT. The time now is 06:13 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.