Im trying switch the Visual Studio asp.net mvc web app template to use MySql for user auth. So far iv installed mysql and .net connectors, created a custom membership provider (although it just throws notsupported atm) and edited the web.config to use them. But no matter what I try i just keep getting the following…
“Failed to generate a user instance of
SQL Server due to failure in
retrieving the user’s local
application data path. Please make
sure the user has a local user profile
on the computer. The connection will
be closed.”
I’ve even searched the entire solution for any reference to sql to make sure its not set somewhere I was’nt expecting it too.
accompanying config is as follows…
<connectionStrings>
<add name="MySqlMembershipConnection"
connectionString="Data Source=server_name;
user id=username;
password=password;
database=database_name;"
providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<membership>
<providers>
<add name="MySqlMembershipProvider" type="testmvcappp.MySqlMembershipProvider" />
</providers>
<membership>
Thanks, Tom.
NOt sure, but a couple thoughts.
1) It’s a generally good practice to call <clear/> in your providers list first to make sure that nothing was set in a “higher” web.config.
2) Is your custom membership provider inheriting from ProviderBase or from the SqlMembershipProvider? If the latter, it may be calling the inherited setup methods