Web site administration tool does not work with ASP.NET MVC

I am just starting out with ASP.NET MVC, and I tried authentication with this new architecture.

So, I started to follow the tutorial on the official website, and although I tried to add some users through the Website Administration Tool, I found this error:

There is a problem with the selected data store. This could be caused by an invalid server name or credentials or insufficient permission. This could also be because the role manager function is not enabled. Click the button below to redirect to a page where you can select a new data warehouse.

When diagnosing the problem, the following message may help: Could not load type 'MyMvcApp.MvcApplication'.

Now the only thing I changed in web.config is the connection string, and I'm sure the connection string is not a problem (this is the same as what I use in another project).

EDIT . Here is the connection string: "Data Source=myMachine\SqlExpress;Initial Catalog=TestDB;User ID=TestUser;Password=123456"

I tried a few things and a lot of google, but nothing worked.

So, any ideas? as I said, I did not change anything in the web.config file except the connection string.

Thanks in advance,

+4
source share
2 answers

Found a problem: I just need a COMPILE solution BEFORE starting WSAT.

Thank you all for your answers.

+8
source

Well, as the message says, this function requires the inclusion of real control, and the MVC website template is disabled by default. Go to Web.config and change:

 <roleManager enabled="false"> 

to

 <roleManager enabled="true"> 

One more thing to check: make sure that when you create the SQL Membership Provider metadata, you connect as a user that will be useful at runtime. In other words, if you connect as sa, then the metadata will be in the dbo schema. But if you connect like you, then the metadata will be in your schema, which is not necessarily useful for other applications. You must run SQL Server Management Studio to check which schema metadata is placed in.

+4
source

All Articles