Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Replacing VS .NET's SQL Server Express Edition Integration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott M. - 29 Nov 2007 05:15 GMT
I've seen many posts and ready articles discussing how changing the
membership & roles "provider" in VS .NET is easy, but have yet to see
instructions on how to do it.

If I already have SQL Server 2000 on a machine and didn't install SQL Server
2005 Express with my VS .NET installation, how do I set up my existing SQL
2000 server to be the membership & roles provider for ASP .NET?
Steven Cheng[MSFT] - 29 Nov 2007 09:27 GMT
Hi Scott,

As for configuring ASP.NET 2.0 membership to connect SQL Server 2000, you
need to do the following things:

** use aspnet_regsql.exe tool to setup a database in sqlserver 2000 db

** add a new membership provider in your ASP.NET 2.0 application which use
a connectionstring pointed to your SQL Server 2000 database

Here are two web articles provided detailed steps:

#Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL
Server 2005
http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

#Using ASP.NET 2.0 Membership API with SQL Server 2000
http://www.vikramlakhotia.com/Using_ASPNET_20_Membership_API_with_SQL_Server
_2000.aspx

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.

--------------------
>Reply-To: "Scott M." <smar@nospam.nospam>
>From: "Scott M." <smar@nospam.nospam>
[quoted text clipped - 8 lines]
>2005 Express with my VS .NET installation, how do I set up my existing SQL
>2000 server to be the membership & roles provider for ASP .NET?
Juan T. Llibre - 29 Nov 2007 09:59 GMT
You beat me to it, Steven... ;-)

Second link reposted, to fix it, as it was broken into 2 lines.

!> #Using ASP.NET 2.0 Membership API with SQL Server 2000
!> http://www.vikramlakhotia.com/Using_ASPNET_20_Membership_API_with_SQL_Server_200
0.aspx


Something to keep in mind, too, is that SQL Server 2000 and SQL Server 2005 Express can coexist.
I have them both running on the same testbox at the same time.

That way, you don't have to deal with custom implementations which might require old syntax.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Hi Scott,
>
[quoted text clipped - 58 lines]
>>2005 Express with my VS .NET installation, how do I set up my existing SQL
>>2000 server to be the membership & roles provider for ASP .NET?
Steven Cheng[MSFT] - 30 Nov 2007 02:39 GMT
Thanks Juan,

I always encounter such broken link issue due to the tool my used :(

Thanks for correcting it.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

--------------------
>From: "Juan T. Llibre" <nomailreplies@nowhere.com>
>References: <B234EAE0-601D-4E1D-B7BA-400BCB80396D@microsoft.com>
<n7jURomMIHA.6908@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Replacing VS .NET's SQL Server Express Edition Integration
>Date: Thu, 29 Nov 2007 05:59:47 -0400
[quoted text clipped - 5 lines]
>!> #Using ASP.NET 2.0 Membership API with SQL Server 2000
>!>
http://www.vikramlakhotia.com/Using_ASPNET_20_Membership_API_with_SQL_Server
_2000.aspx

>Something to keep in mind, too, is that SQL Server 2000 and SQL Server 2005 Express can coexist.
>I have them both running on the same testbox at the same time.
[quoted text clipped - 22 lines]
>>
>> #Using ASP.NET 2.0 Membership API with SQL Server 2000

http://www.vikramlakhotia.com/Using_ASPNET_20_Membership_API_with_SQL_Server
>> _2000.aspx
>>
[quoted text clipped - 7 lines]
>>
>> Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
[quoted text clipped - 28 lines]
>>>2005 Express with my VS .NET installation, how do I set up my existing SQL
>>>2000 server to be the membership & roles provider for ASP .NET?
Scott M. - 30 Nov 2007 02:19 GMT
Ok, ScottGu's blog was a good link to answer my question.

So, now I have a follow up question, which came up in Scott's blog, but was
not answered:

If I have an existing database with my own user/password data already in a
table, how can I configure ASP .NET to use that data?  How would the
provider know to use my tables and what field represents what data?

> Hi Scott,
>
[quoted text clipped - 60 lines]
>>2005 Express with my VS .NET installation, how do I set up my existing SQL
>>2000 server to be the membership & roles provider for ASP .NET?
Juan T. Llibre - 30 Nov 2007 02:50 GMT
1. You could write a custom membership provider.

These articles explain :

http://weblogs.asp.net/scottgu/archive/2005/10/17/427731.aspx

http://msdn2.microsoft.com/en-us/library/aa479038.aspx

http://www.15seconds.com/issue/050216.htm

2. You could add the tables you need to your existing database table.

Here's a guide : http://www.steamed-design.com/

...and here's info on aspnet_regsql.exe :

http://msdn2.microsoft.com/en-us/library/ms229862(vs.80).aspx

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Ok, ScottGu's blog was a good link to answer my question.
>
[quoted text clipped - 65 lines]
>>>2005 Express with my VS .NET installation, how do I set up my existing SQL
>>>2000 server to be the membership & roles provider for ASP .NET?
Steven Cheng[MSFT] - 30 Nov 2007 02:50 GMT
Thanks for your reply Scott,

As you said you already have an existing database that contains the
username/password, is that database previously used by membership
provider(in SQL Express)? If so, since that database has the correct
membership structure, you can surely use it. An easy way is to simply
attach the old database to new server instance(or use SSIS  is they're of
diffferent version).   If the database is not a membership database(but
your own user account database), I'm afraid you will need to maually import
those user account info into ASP.NET membership database through  
membership APIS(such as adduser...).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

--------------------
>Reply-To: "Scott M." <smar@nospam.nospam>
>From: "Scott M." <smar@nospam.nospam>
[quoted text clipped - 27 lines]
>>
>> #Using ASP.NET 2.0 Membership API with SQL Server 2000

http://www.vikramlakhotia.com/Using_ASPNET_20_Membership_API_with_SQL_Server
>> _2000.aspx
>>
[quoted text clipped - 7 lines]
>>
>> Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
[quoted text clipped - 29 lines]
>>>2005 Express with my VS .NET installation, how do I set up my existing SQL
>>>2000 server to be the membership & roles provider for ASP .NET?
Scott M. - 30 Nov 2007 05:52 GMT
> If the database is not a membership database(but
> your own user account database), I'm afraid you will need to maually
> import
> those user account info into ASP.NET membership database through
> membership APIS(such as adduser...).

Yes, this would be the case.  Can you tell me what APIS(such as adduser...)
means?  Thanks!
Steven Cheng[MSFT] - 30 Nov 2007 08:22 GMT
Sure Scott,

For the APIs, just configure your membership provider and then use the
"Membership" class's static methods such as "CreateUser" and "DeleteUser"

  CreateUser  Overloaded. Adds a new user to the data store.  
  DeleteUser  Overloaded. Deletes a user from the database.  

#Membership Methods
http://msdn2.microsoft.com/en-us/library/system.web.security.membership_meth
ods.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

--------------------
>Reply-To: "Scott M." <smar@nospam.nospam>
>From: "Scott M." <smar@nospam.nospam>
>References: <B234EAE0-601D-4E1D-B7BA-400BCB80396D@microsoft.com>
<n7jURomMIHA.6908@TK2MSFTNGHUB02.phx.gbl>
<1C472A8B-4125-4CE5-83EA-D5FA23757BFB@microsoft.com>
<b#oUWvvMIHA.4200@TK2MSFTNGHUB02.phx.gbl>
>In-Reply-To: <b#oUWvvMIHA.4200@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Replacing VS .NET's SQL Server Express Edition Integration
>Date: Fri, 30 Nov 2007 00:52:38 -0500

>> If the database is not a membership database(but
>> your own user account database), I'm afraid you will need to maually
[quoted text clipped - 4 lines]
>Yes, this would be the case.  Can you tell me what APIS(such as adduser...)
>means?  Thanks!
Juan T. Llibre - 30 Nov 2007 10:27 GMT
re:
!> Can you tell me what APIS(such as adduser...) means?  Thanks!

Here's a complete guide :

http://msdn2.microsoft.com/en-us/ms366730(VS.80).aspx

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
>> If the database is not a membership database(but
>> your own user account database), I'm afraid you will need to maually import
>> those user account info into ASP.NET membership database through
>> membership APIS(such as adduser...).
>
> Yes, this would be the case.  Can you tell me what APIS(such as adduser...) means?  Thanks!
sloan - 04 Dec 2007 14:05 GMT
You may find this post:
http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!160.entry

about transferring existing data to a new database...helpful.

..

> I've seen many posts and ready articles discussing how changing the
> membership & roles "provider" in VS .NET is easy, but have yet to see
[quoted text clipped - 4 lines]
> existing SQL 2000 server to be the membership & roles provider for ASP
> .NET?
Scott M. - 04 Dec 2007 22:30 GMT
Thanks, but what I'm asking about is the opposite of what this describes.

I don't want to transfer my data into the aspnet database, I want to not use
the aspnet database and use my database instead.

> You may find this post:
> http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!160.entry
[quoted text clipped - 11 lines]
>> existing SQL 2000 server to be the membership & roles provider for ASP
>> .NET?
Juan T. Llibre - 05 Dec 2007 02:30 GMT
re:
!> I don't want to transfer my data into the aspnet database,
!> I want to not use the aspnet database and use my database instead.

Write your own Membership Provider.
That's the only way you'll be able to do that.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Thanks, but what I'm asking about is the opposite of what this describes.
>
[quoted text clipped - 13 lines]
>>> If I already have SQL Server 2000 on a machine and didn't install SQL Server 2005 Express with my VS .NET
>>> installation, how do I set up my existing SQL 2000 server to be the membership & roles provider for ASP .NET?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.