I am trying to test website on a remote server to see if I can read or write to a MySql Database.
In VS Web developer 2010 Express edition, I created a new website and saved it via ftp on the remote host. I have added the 'Mysql.data.dll' to the website and placed it in the bin directory of the project.
When I try to run the program i get "Could not load File or assembly
MySql.Data, Version=6.3.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Line 4: <compilation debug="true" urlLinePragmas="true">
Line 5: <assemblies>
Line 6: <add assembly="MySql.Data, Version=6.3.5.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
Line 7: </assemblies>
Line 8: </compilation></system.web></configuration>
The remote server supports .Net v2, so I have made my application focused on v2 framework. I have tried similar code on my local machine and works fine.
Can anyone pls advice what I might be doing wrong?
None
0 Points
4 Posts
Could Not Load File or assembly 'MySql.data'
Oct 27, 2010 04:01 AM|amthekkel|LINK
Hi,
I am trying to test website on a remote server to see if I can read or write to a MySql Database.
In VS Web developer 2010 Express edition, I created a new website and saved it via ftp on the remote host. I have added the 'Mysql.data.dll' to the website and placed it in the bin directory of the project.
When I try to run the program i get "Could not load File or assembly MySql.Data, Version=6.3.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
The remote server supports .Net v2, so I have made my application focused on v2 framework. I have tried similar code on my local machine and works fine.
Can anyone pls advice what I might be doing wrong?
cheers,
Abhi
Participant
1781 Points
365 Posts
Re: Could Not Load File or assembly 'MySql.data'
Oct 27, 2010 07:08 AM|Hubble|LINK
You have to install on the server the mysql .net connector. You can download it from here: http://www.mysql.com/downloads/connector/net/
Hope this helps
If this post is useful to you, please .
None
0 Points
4 Posts
Re: Could Not Load File or assembly 'MySql.data'
Oct 27, 2010 07:48 AM|amthekkel|LINK
Hi,
Is there a way resolving this without installing the the MySql connector.
I don't have install access to the server, the only thing I have is access to an ftp client that I can use to upload files to the server.
Is there no way to package the required dll and have the application load the dll on the server?
cheers for your help.
abhi
Participant
1781 Points
365 Posts
Re: Could Not Load File or assembly 'MySql.data'
Oct 28, 2010 04:55 AM|Hubble|LINK
I'm not really sure if you can copy the required files from the GAC to your application's bin folder.
Try it, and tell us if it worked for you.
[Update]
I've found an article that may help you with this:
http://phanibitra.co.cc/index.php/DotNet/Copy-files-from-GAC.html
[/Update]
Hope this helps
If this post is useful to you, please .