I installed ASP.NET Membership tables into a remote database using aspnet_regsql.exe. It seems to have successfully created all the tables in the database that I've seen created in the past when working with this technology. aspnet_regsql also say that the process completed successfully.
I am able to connect to the database fine with sql server management studio and execute queries. I have my web.config file set up containing the relevant settings as shown below.
<connectionStrings>
<add name="ApplicationServices" connectionString="Data Source=**********;Initial Catalog=********;Integrated Security=false;User ID=*************;Password=******" providerName="System.Data.SqlClient" />
</connectionStrings>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
I know the connection to the database works. The connection string is correct. Yet, when I go into the website administration tool to start configuring security I get an error saying:
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: Could not load type 'PVN.Web.MvcApplication'.
So yes, this is an MVC3 application I'm attempting to build. And the name of the web application project is called PNV.Web, but I have no idea what 'PVN.Web.MvcApplication' is.
Any help on this would be greatly appreciated.
Thanks
So it looks like my problem was that my role manager was set to false.
<roleManager enabled="false">
Once I set it to true, I was able to use the Website configuration tool with no problems and everything seemed to start working.
<roleManager enabled="true">
Did you compile the application before attempting to use the website administration tool? It will not work before the site has been compiled.
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