I am creating a website in Visual Web Developer 2012, and I have a login page, so I am using the ASP.NET web configuration tool provided in VWD. When I open the tool in my web browser, everything loads fine, but when I go to the security tab at the top of
the page to set roles and allowed users on my website, it gives me the following error:
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: Unable to connect to SQL
Server database.
I know most of you want my web.config file, so it is provided below.
I know the answer to this involves connecting to a database, but I'm not quite sure how I can do that. I do have Microsoft SQL Server Express installed and set up, but I have no clue how to connect to it from ASP.Net. Thank you in advance.
You can use the link as the reference, the steps to do this for VS2012 is almost the same.
The important thing is to run "aspnet_regsql". You can use your command prompt (not necessary to be the one come with Visual Studio), run it as administrator, the go to "C:\Windows\Microsoft.NET\Framework\v4.0.30319" (this is the default folder for .NET
Framework 4). The web application of .NET Framwork 4.5 actually run on top of this version of framework.
Then follow
Run the following command: aspnet_regsql -S (local) -E -d MyDatabaseName -A all
this in the article.
This process will help you to create a database which ready to be used for MS Asp.NET provider. It is a easy way to create the database for this purpose.
No matter how much time you spend on coding. Wish you happy coding.
My Technical Blog
Marked as answer by Angie xu - MSFT on Dec 02, 2012 10:50 PM
jharrington3...
0 Points
2 Posts
ASP.NET Web Site Administration Tool Error
Nov 25, 2012 02:54 PM|LINK
I am creating a website in Visual Web Developer 2012, and I have a login page, so I am using the ASP.NET web configuration tool provided in VWD. When I open the tool in my web browser, everything loads fine, but when I go to the security tab at the top of the page to set roles and allowed users on my website, it gives me the following error:
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: Unable to connect to SQL Server database.
I know most of you want my web.config file, so it is provided below.
<?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0"/> </system.web> </configuration>I know the answer to this involves connecting to a database, but I'm not quite sure how I can do that. I do have Microsoft SQL Server Express installed and set up, but I have no clue how to connect to it from ASP.Net. Thank you in advance.
CruzerB
Contributor
5399 Points
1098 Posts
Re: ASP.NET Web Site Administration Tool Error
Nov 26, 2012 07:53 AM|LINK
Hi,
Try to follow below link to create a database for the MS ASP.NET provider.
http://yellowduckguy.wordpress.com/2007/06/24/create-a-asp-net-membership-security-database/
My Technical Blog
jharrington3...
0 Points
2 Posts
Re: ASP.NET Web Site Administration Tool Error
Nov 27, 2012 11:49 PM|LINK
I am using visual web developer 2012, not 2005, and the command line isn't installed to my computer. How can I do this with vwd 2012?
CruzerB
Contributor
5399 Points
1098 Posts
Re: ASP.NET Web Site Administration Tool Error
Nov 28, 2012 12:55 AM|LINK
Hi,
You can use the link as the reference, the steps to do this for VS2012 is almost the same.
The important thing is to run "aspnet_regsql". You can use your command prompt (not necessary to be the one come with Visual Studio), run it as administrator, the go to "C:\Windows\Microsoft.NET\Framework\v4.0.30319" (this is the default folder for .NET Framework 4). The web application of .NET Framwork 4.5 actually run on top of this version of framework.
Then follow
Run the following command: aspnet_regsql -S (local) -E -d MyDatabaseName -A all
this in the article.
This process will help you to create a database which ready to be used for MS Asp.NET provider. It is a easy way to create the database for this purpose.
My Technical Blog