1. Please try using the membership provider in this way:
I use the provider like this:
Code: Select all
MysqlProvider prov = new MysqlProvider(); prov.ValidateUser("asdf","asdf");
//throws error.
Check your web.config file for these entries:
I double checked my config file, everything looks good.
2. If it doesn't help, try running our WebProviders sample ( \Program Files\Devart\dotConnect\MySQL\Samples\Web\CS\WebProviders ). Does it work normally?
I have tried getting this to work but I get the error: failed to map the path '/'.
My connection string looks something like this:
"User ID=user; password=user; Port=3306; Host=Ahost; DataBase=mydb"
Using VERSION 5.0.20.0
The execution location is in a WCF service. But I dont' think this should make a difference. The asp.net trust is full. I've used this code to use the connection string ( copies and pasted from the web.config mysqlmembership provider section)
Code: Select all
MysqlConnection acon = new MyslqConnection( ConfigurationManager.ConnectionStrings["CopiedFromWebConfig"].ConnectionString
MysqlCommand acommand = new MysqlCommand("Select * From aspnet_membership");
acon.open(); MysqlDataReader read = acommand.ExecuteReader();
bool abletoread = read.read(); //abletoread is true
This works fine. It should be the same connection string the MysqlMembershipProvider uses since I copied and pasted it from the webconfig. Why does this work but MysqlMembership not work and how to I know what connection string it is trying to use?