1

I'm currently using Visual Studio 2010 and have created a 'ASP.NET MVC 3 Web Application'.

I've changed the question from SQLite to MySQL for reasons pointed out by Darin.

So I've setup my MySQL database and configured the web.config as shown in this answer, however I get instant configuration error on this:

Parser Error Message: Could not load file or assembly 'MySql.Web, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

Line 78: type="MySql.Web.Security.MySQLRoleProvider, MySql.Web

Is this because the public key is wrong?

Thanks

3
  • The system cannot find the file specified. Is there something not clear about the error message you would like to ask about? Commented Mar 4, 2011 at 14:26
  • But it does exist. I added it as a reference in the project and the only place where it's in the web config are from the stack overflow answer you provided earlier. Commented Mar 4, 2011 at 14:29
  • @ing0: how about some feedback on this? Did you use any suggestions below & what worked for you? Commented Sep 23, 2011 at 13:49

4 Answers 4

1

You will need to write a custom membership provider which works with SQLite. Here's an example with MySQL. Also notice that SQLite is not intended to be used in a multithreaded environment such as ASP.NET.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, because of the multithreading, would you suggest that I go with MySQL then? I can't use SQLServer annoyingly :(
Yes, I would suggest you going with some other database.
1

The file is there but versions don't match. Check if you are specifying the correct version for your MySql Connector. This solved the problem for me.

Change Version=6.2.2.0 to the one you are using wherever it applies.

Comments

0

Try this

<add name="ApplicationServices"
         connectionString="Data Source=|DataDirectory|sqlite.db;Version=3;"
         providerName="System.Data.SqLite" />

If you need sqlite membership provider look here:

http://www.codeproject.com/KB/aspnet/SQLiteProviders.aspx

Comments

0

What version of the MySQL connector do you have installed? I saw that error message when I had mismatched the version numbers, and it went away when I corrected them. You can check the version by looking at the properties of the item in the references section.

Once that's working, you may also need to add a default membership provider. All you need to do is change <membership> to <membership defaultProvider="MySqlMembershipProvider">.

I also followed the instructions here which added a bunch of tables to the specified database related to membership, profiles, and roles. Not sure if that was required, but something to try if you're still running into issues.

Hope this helps!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.