After many attempts to use roles management in an ASP.NET project, I am in need of help.
I have a local SQL Server set up, and here are some parts of my web.config file...
<connectionStrings>
<add name="DefaultConnection"
providerName="System.Data.SqlClient"
connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-WebSite2-20130703132914;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-WebSite2-20130703132914.mdf"/>
<add name="SqlRoleManagerConnection"
connectionString="Data Source=my-pc;
Initial Catalog=aspnetdb;Integrated Security=SSPI;"/>
</connectionStrings>
<roleManager enabled="true">
<providers>
<add name="DefaultRoleProvider"
connectionStringName="DefaultConnection" applicationName="/"
type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="SqlRoleManager"
connectionStringName="SqlRoleManagerConnection" applicationName="/"
type="System.Web.Security.SqlRoleProvider"/>
</providers>
</roleManager>
The application is called WebSite.
aspnetdb is already set up on the local database and is ready to manage roles...
When I go to the ASP.NET configuration option in visual studio 2012 express, under security, it tells me that it cannot connect to the database.
I'm guessing the problem is in my web.config file, but I am not sure... Any help would be appreciated!