PDA

View Full Version : Membership and roles provider


GeekO
05-16-2008, 07:55 AM
I have developed a website using Visual Studio 2008 with roles. The site works perfect locally. Now i have used the copy feature and copied over the website to asp.net, i used the sql tools and attached the MDF. First i was getting the error where the membership provider was looking for LocalSqlServer so i added these two lines to the <connections>
<remove name='LocalSqlServer' />
<add name='LocalSqlServer' connectionString='Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword' providerName='System.Data.SqlClient' />

This fixed the main error so the age will show but i still cannot login without an error and when i try to view other pages which deal with membership and roles i also get errors. Is there something special i have to do to change from localhost to remote server? Any ideas?

bruce
05-20-2008, 05:10 AM
Did you see this KB? http://kb.discountasp.net/article.aspx?id=10413

I think wiseMx also made a video on how to do this but i couldn't find the link.

Mark: can you post the link if you see this post?

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

wisemx
05-20-2008, 07:40 AM
This one bro?
http://iis7testcom.web701.discountasp.net/membershipprovider/

I'm still buttoning up the work I've been doing on the house.
Should be back to the Videos very soon, but yes, my poor hands. http://community.discountasp.net/emoticons/tongue.gif

GeekO
05-21-2008, 12:15 AM
I got it fixed, i had two different ms sql users created and used the wrong password with the wrong user.

bruce
05-21-2008, 11:24 AM
cheers mate!

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

pcdebb
07-14-2008, 03:01 AM
Hello, I apologize for bringing up an old thread.

I followed the link and it created the tables and all the other good stuff. When I use the website administration tool, it does not like the username (the DASP one), so i cant insert any users or do any membership stuff. when i goto the provider page, it has the AspNetSqlProvider selected, but it says it cannot connect to the database. I'm certain the connection string in my web.config is correct because I'm able to see my data on the live page (that needs to be protected). FWIW, the LocalSqlServer has the same information.

What might I be missing or doing wrong?

pcdebb
07-14-2008, 03:27 AM
second time tonite. Silly me. the password was wrong in the string.