473,468 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Aug 15 '07 #1
4 2433
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\CON FIG\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
Aug 15 '07 #2
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/smarterti...px?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/subscripti...ult.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/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



Aug 16 '07 #3
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]" <st*****@online.microsoft.comwrote in message
news:x$**************@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/smarterti...px?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/subscripti...ult.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/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.



Aug 19 '07 #4
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.
Aug 20 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bendik Engebretsen | last post by:
I have made an ASP.NET 2.0 WebSite using the 'Personal WEB site' starter kit. It runs fine on my XP machine where I have the VStudio.NET 2005 Beta installed. But if I try to run it from our Win...
4
by: VB Programmer | last post by:
In 2.0 what is ASPNETDB.MDF used for? I'm not using any type of security for this site. Do I need this when deploying?
5
by: VB Programmer | last post by:
My web hoster says that I have to rename my ASPNETDB.MDF SqlExpress db for my 2.0 site to work. Is this accurate? If so, how can I rename it without breaking anything on my site? FYI: This is...
2
by: te goody | last post by:
Problem summary: Web Site Admin Tool is not generating the application services database (aspnetdb.mdf); i.e. The DB is not found under the app_data directory. The Question: What configuration...
1
by: Derek | last post by:
I am trying to deploy a web site on a server but I am having problems with the ASPNETDB database. It works fine in development on my PC but as SQL Server 2005 Express Edition only supports local...
0
by: RAM | last post by:
Hello, I have written simple ASP.NET application with logging in. I need to open ASPNETDB database to read some information which is not available using class library (custom table). I have...
1
by: 3Dfelix | last post by:
Problems when uploading ASPNETDB.MDF to production server Hi all, I'm a little web with a login page and aspnetdb.mdf file as data base for users. I've done it on local server, with VS2005 and...
3
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
How can I rename the default ASPNETDB.MDF database when a login control is used? -- L. A. Jones
2
by: Mr. X. | last post by:
Hello. I am looking for aspnetdb.mdf - the ".bak" file. For some security reason, the hosting company (which indeed supports sql express) should have aspnetdb.mdf bak file. I have the Microsoft...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.