Pages

Tuesday, June 17, 2008

Using A Different Database as a Membership Provider in ASP.NET

There should be no need for me to ask this but after 2 days of ditzing around trying to make this work I am at the end of my patience. Linux is looking better all the time.

Ok, I created a website with security and it works great on my desktop, the performance sucks (utterly) on the test webserver, and I cannot use it at all on the production server. That's because we must use real MSSQL in production rather than a user instance, the production environment does not support user instances.

All I need is to tell my membership, role, and security objects, "Look over here, not over there". One would think that altering a connectionstring and replicating the membership tables would be all thats needed.

But NO.

Plus, I can't seem to find a comprehensive tutorial on this anywhere, so I'm mixing info from blogs and msdn and whatnot trying to make this work. Most of the tutorials out there are for MSSQL2000 (I'm using 2005) and a mix of ASP.NET 2.0 and 3.5 (Im using 3.5 - I think)

Here is what I want.

On my workstation, I want the authentication to look in my local MSSQL Express database for ALL security info.

In Production, I want the web server to look in the FULL MSSQL database for this info.

I do NOT NOT NOT want to re-engineer membership and roles objects.

Here's what I have found so far.

http://msdn.microsoft.com/en-us/library/sx3h274z.aspx - generic - no specifics

http://msdn.microsoft.com/en-us/library/6e9y4s5t.aspx - this adds my new database to the MEMBERSHIP selection but not the Single Provider or Role Provider

http://msdn.microsoft.com/en-us/library/2fx93s7w.aspx - This helps you create the table structure in your database, but leaves out 1 critical piece of info... the fact that I had to type "/sqlexpress" after the server name or it crashes when you try to drop down the list.

http://forums.asp.net/p/980214/2369556.aspx - This is where I found out you have to type "/sqlexpress"

http://msdn.microsoft.com/en-us/library/ms998317.aspx - not sure if "Forms Authentication" is what I'm doing or not...

No comments:

Share This!

Contact Us

Name

Email *

Message *