Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Site Administration Tool in visual studio 2012

I can't figure out how to configure my web.config in order to make the web-site-admistration tool work with an MVC 4 project in visual studio 2012.

Here are the steps to reproduce this behaviour

  • create a new MVC4 project in visual studio 2012
  • run the project (ctrl+f5)
  • register yourself and login. You will notice that in the app_data folder, a new file is created. e.g. aspnet-MvcApplication6-20121009211525.mdf
  • if you open the mdf file (within visual studio), you will be able to browse the schema in the server explorer window.

  • now start the web site administration tool (project->asp.net configuration). Try to go to the security tab. You should see me message like this:

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 already googled for a solution to my problem but it seems that most answers are targeting older versions of MVC / visual studio, so I wasn't successful yet. What surprises me is there is no membership nor a roleManager section in the web.config when you use the standard MVC 4 template (whereas if you create a ASP.NET Forms application you'll see both sections. Unfortunately I got the same error with the ASP.NET WebForms template so I didn't continue to investigate.). Also, the roleManager or membership config sections typically define a provider which is comes from the System.Web.Provider assembly. The MVC 4 template does not even reference the System.Web.Provider assembly, so I wonder how the role/membership works in MVC 4. It might be obsolete in the new version but I didn't find information on this topic (the System.Web.Security assembly seems to replace System.Web.Provider). My error might also be related to the fact that I only have LocalDB installed and no other SQL server instance.

So my question is: Can you reproduce this error and are you able to fix it? What is the cause of this?

Any help will be appreciated.

like image 666
shaft Avatar asked Oct 09 '12 20:10

shaft


People also ask

How to access Web Site Administration Tool?

Premium for Web and open any database. Click the Tools menu, and then click Web Site Administration. The Web Site Administration tool appears: Under the User Account tab, click the Edit button.

Which of the following Windows administration tool provide a web interface?

The Application tab provides a simple Web interface for managing configuration settings that are stored in the Web. config file for your application.


1 Answers

I've found the answer here: The ASP.NET Web Site Administration Tool (WSAT) is not compatible with SimpleMembership

like image 146
shaft Avatar answered Nov 24 '22 00:11

shaft