Hi Gary,
ASP.NET 2.0 ships with predefined SqlMembership provider which point to
local SQL Express database - you can find its declaration in machine.config
(c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config):
<membership>
<providers>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer" enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />
</providers>
</membership>
If you want to connect to another SQL server database you have to register
new provider instance in your web.config file:
<membership defaultProvider="SqlProvider">
<providers>
<clear />
<add connectionStringName="myConn" applicationName="/"
name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
You have to define connection string (named myConn in my example) to point
to your new database. If you are going to use full SQL 2005 you will also
need to create login for your application to allow connection to database.
Regards,
Ladislav
> I have a 2.0 Website application in the dev environment that uses a SQL
> Server 2005 DB and also uses the authentication controls and classes that
[quoted text clipped - 13 lines]
> Thanks,
> Gary
Steven Cheng[MSFT] - 16 Aug 2007 03:27 GMT
Thanks for Ladislav's informative inputs.
Hi Gary,
For your deployment scenario here, I think the following two things are
most important:
** Since SQL Server Express's database(your current mdf data file based
database ) are just a standard SQL server 2005 data file, you can simply
copy it to production server and use "attach database" operation:
#How to move SQL Server databases to a new location by using Detach and
Attach functions in SQL Server
http://support.microsoft.com/kb/224071
** You need to customize the default SQL membership provider's
connectionstring(by default point to local sqlexpress instance) or you can
add a new custom membership provider(also use the SqlMembershipProvider
class) and use your own connecticonstring to the standard SQL Server
instance:
#Examining ASP.NET 2.0's Membership, Roles, and Profile - Part 1
http://aspnet.4guysfromrolla.com/articles/120705-1.aspx
#How to Configure Your ASP.NET 2.0 Account's Membership Database
http://help.maximumasp.com/smarterticket/Customer/KBArticle.aspx?articleid=8
78
Hope this helps. If you have any further questions, welcome to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
GaryDean - 19 Aug 2007 18:43 GMT
Steven,
I'm starting a new thread on this as my problems are getting worse on this
issue. Hope you can have a look.

Signature
Regards,
Gary Blakely
> Thanks for Ladislav's informative inputs.
>
[quoted text clipped - 54 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Steven Cheng[MSFT] - 20 Aug 2007 02:30 GMT
Hi Gary,
Thanks for your reply.
Do you mean the following new thread you posted?
"SQL Membership Provider Problem"
No problem. I'll have a look and reply you there.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.