Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change my asp.net membership database from express to standard sql?

I am building an ASP.NET 3.5 (C#) application and I plan to use the membership and roles security.

I want to set this up on my SQL Server 2008 standard edition and not the default express setting.

How would I go about this?

like image 929
littlechris Avatar asked Dec 21 '25 03:12

littlechris


2 Answers

You can install membership database with this command aspnet_regsql.exe at *C:\Windows\Microsoft.NET\Framework\v2.0.50727* (adjust to your path)

You can find more details here

like image 200
NinethSense Avatar answered Dec 22 '25 15:12

NinethSense


It doesn't matter wich database server version you are using for the ASP.NET security membership/role module, apart from being SQL Server.

To set up manually this security on a server you have to run these scripts:

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallCommon.sql

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallMembership.sql

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallRoles.sql

and configure web.config accordingly (see http://msdn.microsoft.com/en-us/library/6e9y4s5t.aspx).

You may run this scripts using the same database where you have your data, or you can create a new database to store user membership or role related data and run them there.

like image 34
eKek0 Avatar answered Dec 22 '25 17:12

eKek0



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!