I developed an asp.net web form app in VS2012, I want to set the security by this WSAT.
I just want to set my site to Integrated Miscrsoft Windows authentication (from a local network). from my local machine I have SQL server express 2008 installed in my machine.
I then run the WSAT tool, but when I clicking on the "Security" tab, I got this 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.
Based on the instruction, the App_Data and aspnetdb.mdf should be created by click this Security tab, but in my case , it did not create it.
I also tried to run ASPNET_REGSQL.EXE, then the aspnetdb.mdf is created, but it is created under SQL server subfolder, not in App_Data folder(even I menually created this folder, but the database still can not be created under it ).
The localdb is created by VStudio and is stored in the physical \App_Data folder (located in your projects physical location) by default. You can browse it by going to your Project folder and it is under the \App_Data directory. If you openup Server Explorer
(Under VStdio's View menu), you can see the fullpath of your *.mdf file under the "Data Connections" tree. Make sure this connection string is correctly pointing to the physical location of the App_Data directory. To get rid of your error, I would suggest
creating a brand new VStudio webform project, launch WSAT, Go to Provider tab and click on the Test. This will create the default *.mdf file for you. If you like to add this to your VisualStudio's App_Data node, just right click on App_Data in your VStudio,
click add existing and then browse to the physical location of App_Data and select the auto generated mdf file. This will list your physical *.mdf file from physical App_Data folder into the VStudio's App_Data node.
The localdb is created by VStudio and is stored in the physical \App_Data folder (located in your projects physical location) by default. You can browse it by going to your Project folder and it is under the \App_Data directory. If you openup Server Explorer
(Under VStdio's View menu), you can see the fullpath of your *.mdf file under the "Data Connections" tree. Make sure this connection string is correctly pointing to the physical location of the App_Data directory. To get rid of your error, I would suggest
creating a brand new VStudio webform project, launch WSAT, Go to Provider tab and click on the Test. This will create the default *.mdf file for you. If you like to add this to your VisualStudio's App_Data node, just right click on App_Data in your VStudio,
click add existing and then browse to the physical location of App_Data and select the auto generated mdf file. This will list your physical *.mdf file from physical App_Data folder into the VStudio's App_Data node.
Hi, thanks a lot for your help,
Since I can not get connection from the webapplication I created (I created that apps based on empty web form), so I created another web form application (just want to get the working connection string), but this time I used the vs template, and them I tried
to use WSAT , it works, so from the web.config file, I found the connection as this:
So I copied this connection setup and paste to my web application, and tried to use WSAT, it still does not work, could you please tell me what is other steps should I follow to make it work. since my web form application has many components, I want to make
minimal changes to make the WSAT work.
Peter Cong
Member
527 Points
681 Posts
Why Did I get this error when using Web Site Administration Tool Security tab?
Jan 30, 2013 02:40 PM|LINK
Hi,
I developed an asp.net web form app in VS2012, I want to set the security by this WSAT.
I just want to set my site to Integrated Miscrsoft Windows authentication (from a local network). from my local machine I have SQL server express 2008 installed in my machine.
I then run the WSAT tool, but when I clicking on the "Security" tab, I got this 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.
Based on the instruction, the App_Data and aspnetdb.mdf should be created by click this Security tab, but in my case , it did not create it.
I also tried to run ASPNET_REGSQL.EXE, then the aspnetdb.mdf is created, but it is created under SQL server subfolder, not in App_Data folder(even I menually created this folder, but the database still can not be created under it ).
Does anybody know what steps I missed?
Enamul Kh-MS...
Member
86 Points
18 Posts
Re: Why Did I get this error when using Web Site Administration Tool Security tab?
Feb 01, 2013 05:29 PM|LINK
The localdb is created by VStudio and is stored in the physical \App_Data folder (located in your projects physical location) by default. You can browse it by going to your Project folder and it is under the \App_Data directory. If you openup Server Explorer (Under VStdio's View menu), you can see the fullpath of your *.mdf file under the "Data Connections" tree. Make sure this connection string is correctly pointing to the physical location of the App_Data directory. To get rid of your error, I would suggest creating a brand new VStudio webform project, launch WSAT, Go to Provider tab and click on the Test. This will create the default *.mdf file for you. If you like to add this to your VisualStudio's App_Data node, just right click on App_Data in your VStudio, click add existing and then browse to the physical location of App_Data and select the auto generated mdf file. This will list your physical *.mdf file from physical App_Data folder into the VStudio's App_Data node.
Peter Cong
Member
527 Points
681 Posts
Re: Why Did I get this error when using Web Site Administration Tool Security tab?
Feb 05, 2013 06:03 PM|LINK
Hi, thanks a lot for your help,
Since I can not get connection from the webapplication I created (I created that apps based on empty web form), so I created another web form application (just want to get the working connection string), but this time I used the vs template, and them I tried to use WSAT , it works, so from the web.config file, I found the connection as this:
<connectionStrings> <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString= "Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-WebApplication3-20130201223234;Integrated Security=SSPI; AttachDBFilename=|DataDirectory|\aspnet-WebApplication3-20130201223234.mdf" /> </connectionStrings>
So I copied this connection setup and paste to my web application, and tried to use WSAT, it still does not work, could you please tell me what is other steps should I follow to make it work. since my web form application has many components, I want to make minimal changes to make the WSAT work.
Thanks
Enamul Kh-MS...
Member
86 Points
18 Posts
Re: Why Did I get this error when using Web Site Administration Tool Security tab?
Feb 13, 2013 02:26 AM|LINK
You need to replace the DBFileName and Catalog name(aspnet-WebApplication3-20130201223234) with the correct one from your current project:
This is the format: aspnet-NameOfWebApp-hashnumber
Enamul Kh-MS...
Member
86 Points
18 Posts
Re: Why Did I get this error when using Web Site Administration Tool Security tab?
Feb 20, 2013 10:57 PM|LINK
Marking this thread as closed. If you require any further assistance, please contact support.microsoft.com