Click here to Skip to main content
15,884,064 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

I am writing a web app in which I am using mysql.data.dll to connect to database
but when i tried this site locally on my system it is running correctly. but I am unable to run it on my server.

I googled the error
and I tried all possible solution. but without result

my dll is in bin folder and I have refrence to the same

name space declaration.....

C#
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using MySql.Data.MySqlClient;
using MySql.Data.Types;
using System.Text;



//MySqlDataReader myData = default(MySqlDataReader);
Line 17:         //MySql.Data.MySqlClient.MySqlConnection con = new MySqlConnection("Server=localhost;Database=DCC;Uid=root;Pwd=********");
Line 18:         MySql.Data.MySqlClient.MySqlConnection con = new MySqlConnection("******************************


Please help me
I am unable to find out my mistakes

Thanks in advance
Santosh Sharma
Posted

1 solution

Kindly check whether the dll exists in your reference folder of your solution(in tool)not in windows explorer.
 
Share this answer
 
Comments
sansharam 4-Jul-15 9:40am    
checked it and it seems all rightly done
while adding reference Local copy is true so dll is in bin folder
Path is also the same.
sansharam 14-Jul-15 0:11am    
Sorry all

i found my mistake
I had to copy all dlls to bin directory at the root
i did copied all dlls at a seperate directory/bin in the root directory
now I copied all dlls and files to the bin directory in the root.... now problem solved

I thought some one may be helped by my answer...............

Regards
Santosh Sharma

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900