|
|
|
start date: Wed, 15 Aug 2007 09:14:37 -0700,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
GaryDean am
|
|
2
Ladislav Mrnka
|
|
3
(Steven Cheng[MSFT])
|
|
4
GaryDean am
|
|
5
(Steven Cheng[MSFT])
|
transfering ASPNETDB.MDF Authentiocation to SQLServer
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
automatically use SQLServer Express. It all works fine in the dev
environment.
Now I want to deploy but I want to transfer what's in the ASPNETDB.MDF db
into my 2005 database so that I don't need to deploy SQLServer Express. I
can import those tables into my man database but I can't seem to find what
is pointing to the express database.
I've googled around but everything I've found seem to just talk around the
issue.
Anyone know how to do this? What needs to changes?
Thanks,
Gary
Date:Wed, 15 Aug 2007 09:14:37 -0700
Author:
|
RE: transfering ASPNETDB.MDF Authentiocation to SQLServer
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
"GaryDean" wrote:
> 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
> automatically use SQLServer Express. It all works fine in the dev
> environment.
>
> Now I want to deploy but I want to transfer what's in the ASPNETDB.MDF db
> into my 2005 database so that I don't need to deploy SQLServer Express. I
> can import those tables into my man database but I can't seem to find what
> is pointing to the express database.
>
> I've googled around but everything I've found seem to just talk around the
> issue.
>
> Anyone know how to do this? What needs to changes?
>
> Thanks,
> Gary
>
>
>
Date:Wed, 15 Aug 2007 09:54:02 -0700
Author:
|
RE: transfering ASPNETDB.MDF Authentiocation to SQLServer
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.
Date:Thu, 16 Aug 2007 02:27:58 GMT
Author:
|
Re: transfering ASPNETDB.MDF Authentiocation to SQLServer
Steven,
I'm starting a new thread on this as my problems are getting worse on this
issue. Hope you can have a look.
--
Regards,
Gary Blakely
"Steven Cheng[MSFT]" wrote in message
news:x$08Z063HHA.4100@TK2MSFTNGHUB02.phx.gbl...
> 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.
>
>
>
>
>
>
>
>
>
Date:Sun, 19 Aug 2007 10:43:01 -0700
Author:
|
Re: transfering ASPNETDB.MDF Authentiocation to SQLServer
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.
Date:Mon, 20 Aug 2007 01:30:05 GMT
Author:
|
|
|