When you setup the asp.net membership, profile, etc using the aspnet_regsql wizard its pretty much an all or nothing affair - it adds all of the possible features in one go with no option to select which features are added.
When setting up the login systems you only need to add the following feature support: Membership, Role Manager and Profiles. The two remaining features (Personalization and SQL Web event provider) are not needed.
So to only install the features you require you should use the command line version of the tool.
Note: The version listed below (v2.0.50727) is valid for both .net 2.0 and .net 3.5. Without going into the technical details .net 3.5 is a layer on top of 2.0 and the same tool is used for both versions.
If you are working with a version that is newer than 3.5 then check that versions folder for an updated version of this tool as it may be updated in future versions.
Getting the command window open (Windows Vista)
- Click the start button then copy and paste this into the search box C:\Windows\Microsoft.NET\Framework\
- While holding the shift key down, right click on the folder called "v2.0.50727".
- You will see the normal context menu but with an extra option called "Command Window Here"
Getting the command window open (Older versions of Windows)
- Click the start button, select Run.
- Type "cmd" without the speech marks and press enter
- Copy this line of text: cd C:\Windows\Microsoft.NET\Framework\v2.0.50727\
- Right click in the command prompt window and choose paste.
- Press enter
Setting up the database
Now that you are in the correct location you should type the text below into the command line.
aspnet_regsql.exe -E -S .\SQLEXPRESS -A mrp -d databasenameThe -E, -S, -A and -d are all case-sensitive so make sure you type the line exactly!
Replace SQLEXPRESS with the instance name of your database server - if you're using the free version of Sql Server then you will almost certainly be called .\SQLEXPRESS. The .\ bit at the start means "this computer" so if your sql server is on a different server then put the computer name there such as COMPUTER\SQLEXPRESS.
Replace databasename with the name of the database you want to add these features to.
What do the command line parameters mean?
You can get a full explanation of all the options available by typing:
aspnet_regsql -?
Here is a run down of the parameters we used:
-E Auth with windows credentials -S server instance -A services to add (membership, roles, profiles) -d database name
REMEMBER - Parameters are case sensitive
Did it work?
Press enter and you should see this:
Start adding the following features: Membership Profile RoleManager ....... Finished. C:\Windows\Microsoft.NET\Framework\v2.0.50727>
3 comments :
Thanks for the tip.
Helped a lot.
Thank you so much. it was really helpful. I have shared IP server and this post solved my problem to have a nonautomated membership database.
Post a Comment