I was on Windows XP/VWD 2008 Express/SQL Server 2008 Express and have moved to Vista/VWD 2010 Express/SQL 2008 Express.
I was able to create a new web site, then using aspnet_regsql create a membership database, modify the connectionstring with login id and password in web.config in the new web site, and then access the membership database using asp.net configuration. I
also, set the role manger enabled to “true”.
Now, when I perform the same tasks, I get the following error message: “The following message may help in diagnosing the problem:
Login failed for user 'adminTEST'.”
I tried to figure out what I’m doing wrong or not doing that is causing my problem. Does any one know what I may be doing wrong?
It seems that the new membershid db you created doesn't have login access for user 'adminTEST' you specified in the querystring.
Did you check in SQL Server if this account login is mapped to the new db?
After I created the membership database, I added the login and password in SQL Server and mapped the user to the membership database and gave it owner rights. And used this information in the querystring. The same way that I did this in my older setup.
This is the full error message I get in ASP.NET Configuration.
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to
a page where you can choose a new data store.
The following message may help in diagnosing the problem:
Login failed for user 'adminTEST'.
I have verified that I'm using the correct server name and instance name. I've verified that the user adminTEST has the rights to access the membership database in SQL Server. I have set the role manager to enabled true in web.config. All the same
as when I was able to successfully access the membership database from web.config in my older setup.
Yes, I could right the routine to add the user through the membership api. But since I cannot access the membership database through ASP.NET Configuration, I would also have to right the routines to delete users, add roles, delete roles, manage roles, etc.
It seems to me, that I should be able to do all of this through the ASP.NET Configuration. I was able to do all of this through ASP.NET Configuration with VWD 2008 Express and SQL Server 2008 Express and I believe that the passwords were stored as a Hash
value then.
Am I misunderstanding this?
Thank you for your help and anything else that you may be able to suggest.
I have verified that I'm using the correct server name and instance name. I've verified that the user adminTEST has the rights to access the membership database in SQL Server. I have set the role manager to enabled true in web.config. All the same as when
I was able to successfully access the membership database from web.config in my older setup.
Why don't you drag a SQLdatasource control on a page and use the wizard to connect to your database. if you can connect, then you'll know the ConnectionString to use....
bbg
Member
89 Points
158 Posts
Accessing a membership database
May 20, 2012 04:38 PM|LINK
Hello,
I was on Windows XP/VWD 2008 Express/SQL Server 2008 Express and have moved to Vista/VWD 2010 Express/SQL 2008 Express.
I was able to create a new web site, then using aspnet_regsql create a membership database, modify the connectionstring with login id and password in web.config in the new web site, and then access the membership database using asp.net configuration. I also, set the role manger enabled to “true”.
Now, when I perform the same tasks, I get the following error message: “The following message may help in diagnosing the problem: Login failed for user 'adminTEST'.”
I tried to figure out what I’m doing wrong or not doing that is causing my problem. Does any one know what I may be doing wrong?
Thanks for any help that I can get.
ron
manight
Member
59 Points
60 Posts
Re: Accessing a membership database
May 20, 2012 08:46 PM|LINK
It seems that the new membershid db you created doesn't have login access for user 'adminTEST' you specified in the querystring.
Did you check in SQL Server if this account login is mapped to the new db?
bbg
Member
89 Points
158 Posts
Re: Accessing a membership database
May 20, 2012 10:31 PM|LINK
After I created the membership database, I added the login and password in SQL Server and mapped the user to the membership database and gave it owner rights. And used this information in the querystring. The same way that I did this in my older setup.
manight
Member
59 Points
60 Posts
Re: Accessing a membership database
May 21, 2012 09:18 AM|LINK
I think a more detailed error report is needed... If the user is there I have no other idea with the information provided.
hans_v
All-Star
35998 Points
6551 Posts
Re: Accessing a membership database
May 21, 2012 11:45 AM|LINK
By default, the password is stored as a Hash value. You should create a user through the membership api
http://msdn.microsoft.com/en-us/library/system.web.security.membership.createuser.aspx
bbg
Member
89 Points
158 Posts
Re: Accessing a membership database
May 21, 2012 04:46 PM|LINK
Thank you for your help so far.
This is the full error message I get in ASP.NET Configuration.
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Login failed for user 'adminTEST'.
I have verified that I'm using the correct server name and instance name. I've verified that the user adminTEST has the rights to access the membership database in SQL Server. I have set the role manager to enabled true in web.config. All the same as when I was able to successfully access the membership database from web.config in my older setup.
ron
bbg
Member
89 Points
158 Posts
Re: Accessing a membership database
May 21, 2012 04:57 PM|LINK
Hello,
Yes, I could right the routine to add the user through the membership api. But since I cannot access the membership database through ASP.NET Configuration, I would also have to right the routines to delete users, add roles, delete roles, manage roles, etc. It seems to me, that I should be able to do all of this through the ASP.NET Configuration. I was able to do all of this through ASP.NET Configuration with VWD 2008 Express and SQL Server 2008 Express and I believe that the passwords were stored as a Hash value then.
Am I misunderstanding this?
Thank you for your help and anything else that you may be able to suggest.
ron
venugopaldik...
Member
44 Points
26 Posts
Re: Accessing a membership database
May 21, 2012 05:22 PM|LINK
Yes you are right. ASP.NET membership details will use hash code and save it in DB.
So it works in the same way in regular versions of SQL server as they work in Express editions. Their is no change in it.
India.
hans_v
All-Star
35998 Points
6551 Posts
Re: Accessing a membership database
May 21, 2012 06:44 PM|LINK
Why don't you drag a SQLdatasource control on a page and use the wizard to connect to your database. if you can connect, then you'll know the ConnectionString to use....
bbg
Member
89 Points
158 Posts
Re: Accessing a membership database
May 27, 2012 05:02 PM|LINK
Remote access to SQL Server 2008 Express was not enabled. I enabled remote access to SQL Server 2008 Express and it now works.
Thank you all for your help.
ron