I’m trying to set authentication username and password manually in web.config file in my mvc 3 app:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
<credentials passwordFormat="Clear">
<user name="admin" password="secret" />
</credentials>
</authentication>
And the following warning occures:
Warning 1 The element ‘authentication’ has invalid child element ‘credentials’. List of possible elements expected: ‘forms, passport’. C:\Users\Aleksey\documents\visual studio 2012\Projects\SportStore\SportStore.WebUI\Web.config 20 8 SportStore.WebUI
I also tried to use aspnet_regsql.exe tool, but I use Entity Framework mapper, so my database has (.sdf) extension (SQL Server Compact Edition Database File) which is not supported. I tried to add Microsoft.AspNet.Providers.SqlCE via nuget package manager. 4 default providers adn new connection string have appeared in web.config file. I changed connection strings of providers to “EfDbContext” (class that inherits from DbContext), nothing’s work.
I’m new to authentication. Mabby You know some useful source where “how to use EF in authentication” is descibed in detail?
Thank You in advance.
It should be