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
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.
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.
The Application tab provides a simple Web interface for managing configuration settings that are stored in the Web. config file for your application.
I've found the answer here: The ASP.NET Web Site Administration Tool (WSAT) is not compatible with SimpleMembership
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With