My host doesn't offer SqlServer, so I'm taking a swing at MySql and so far
I'm getting a FileNotFoundException in my asp.net app when I try to
instantiate a MySqlConnection object.
I have added a reference to the dll and including the namespace in my using
directive.

Here is the stack trace:
[FileNotFoundException: The system cannot find the file specified.]

[FileNotFoundException: File or assembly name 'MySql.Data,
Version=1.0.4.20163, Culture=neutral, PublicKeyToken=c5687fc88969c44d', or
one of its dependencies, was not found.]
TheHudsonDrags.BackEnd_Components.CDAL..ctor() in e:\files\web
sites\thehudsondrags\web_root\backend_components\dal.cs:23
TheHudsonDrags.Controls.News.Page_Load(Object sender, EventArgs e) in
e:\files\web sites\thehudsondrags\web_root\controls\news.ascx.cs:22
System.Web.UI.Control.OnLoad(EventArgs e) +102
System.Web.UI.Control.LoadRecursive() +45
System.Web.UI.Control.LoadRecursive() +130
System.Web.UI.Control.LoadRecursive() +130
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +952


I really don't see the problem. I have added the reference, so how does it
not know where it is? Confusing.

Any help appreciated,
Steve

Re: MySql ado.net connector problem by Mark

Mark
Tue Aug 02 17:02:14 CDT 2005

"Steve" <sss@sss.com> wrote in message
news:%23pDn2s6lFHA.572@TK2MSFTNGP15.phx.gbl...

> I really don't see the problem. I have added the reference, so how does
> it
> not know where it is? Confusing.

Not necessarily...

1) What is the name (not the IP address) of the machine on which the
instance of mySQL is running?

2) What client are you using to (try to) connect to it?

3) Are you trying to use one of the native .NET data providers, OleDb or
ODBC?

4) What is your mySQL Connection string?



Re: MySql ado.net connector problem by Steve

Steve
Tue Aug 02 17:20:14 CDT 2005


"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23z4Na36lFHA.2156@TK2MSFTNGP14.phx.gbl...
> "Steve" <sss@sss.com> wrote in message
> news:%23pDn2s6lFHA.572@TK2MSFTNGP15.phx.gbl...
>
> > I really don't see the problem. I have added the reference, so how does
> > it
> > not know where it is? Confusing.
>
> Not necessarily...
>
> 1) What is the name (not the IP address) of the machine on which the
> instance of mySQL is running?
>
> 2) What client are you using to (try to) connect to it?
>
> 3) Are you trying to use one of the native .NET data providers, OleDb or
> ODBC?
>
> 4) What is your mySQL Connection string?
>
>

oh good, someone will help me ;)

1) mysql4.brinkster.com

2) I am trying to connect with asp.net web app. I can connect with the
"MySql Administrator" application

3) Yes, I downloaded the ado.net provider from the mysql.com site

4) server=mysql4.brinkster.com;user id=xxxxxx; password=xxxxxx;
database=xxxxxx; pooling=false



Re: MySql ado.net connector problem by Steve

Steve
Tue Aug 02 17:21:25 CDT 2005

I found this post:
(http://forums.mysql.com/read.php?38,32144,36425#msg-36425)
"This could be caused by several reasons. In your case, check that you
registered both the mysql.data.dll and the icsharpcode assembly. It sounds
like mysql.data is found but the zip lib is not found."

However this makes no sense to me. A google on the question further
confused me....


"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23z4Na36lFHA.2156@TK2MSFTNGP14.phx.gbl...
> "Steve" <sss@sss.com> wrote in message
> news:%23pDn2s6lFHA.572@TK2MSFTNGP15.phx.gbl...
>
> > I really don't see the problem. I have added the reference, so how does
> > it
> > not know where it is? Confusing.
>
> Not necessarily...
>
> 1) What is the name (not the IP address) of the machine on which the
> instance of mySQL is running?
>
> 2) What client are you using to (try to) connect to it?
>
> 3) Are you trying to use one of the native .NET data providers, OleDb or
> ODBC?
>
> 4) What is your mySQL Connection string?
>
>



Re: MySql ado.net connector problem by Mark

Mark
Wed Aug 03 01:19:04 CDT 2005

"Steve" <sss@sss.com> wrote in message
news:OOfOcB7lFHA.3380@TK2MSFTNGP10.phx.gbl...

> 1) mysql4.brinkster.com

OK.

> 2) I am trying to connect with asp.net web app. I can connect with the
> "MySql Administrator" application

OK - so we know that mySQL is actually running on that box...

> 3) Yes, I downloaded the ado.net provider from the mysql.com site

And installed it? And added it as a Reference into your ASP.NET project?

> 4) server=mysql4.brinkster.com;user id=xxxxxx; password=xxxxxx;
> database=xxxxxx; pooling=false

Hmm - that doesn't look quite right... Is that similar to the examples for
the .NET provider you got from the web?

I've only ever used the CoreLabs native .NET data provider, in which case
the string would look something like:

"User ID=root; Password=xxxxxx; Host=mysql4.brinkster.com; Port=3306;
Database=xxxxxx;Direct=true; Protocol=TCP; Compress=false; Pooling=true; Min
Pool Size=0;Max Pool Size=100; Connection Lifetime=0"



Re: MySql ado.net connector problem by Steve

Steve
Wed Aug 03 10:31:55 CDT 2005


"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%234hNCN$lFHA.3312@tk2msftngp13.phx.gbl...
> "Steve" <sss@sss.com> wrote in message
> news:OOfOcB7lFHA.3380@TK2MSFTNGP10.phx.gbl...
>
> > 1) mysql4.brinkster.com
>
> OK.
>
> > 2) I am trying to connect with asp.net web app. I can connect with the
> > "MySql Administrator" application
>
> OK - so we know that mySQL is actually running on that box...
>
> > 3) Yes, I downloaded the ado.net provider from the mysql.com site
>
> And installed it? And added it as a Reference into your ASP.NET project?
Yes, I installed it and from what I can tell, it simply copied the dll to
the C:\Program Files\MySql\etc, etc, etc...

>
> > 4) server=mysql4.brinkster.com;user id=xxxxxx; password=xxxxxx;
> > database=xxxxxx; pooling=false
>
> Hmm - that doesn't look quite right... Is that similar to the examples for
> the .NET provider you got from the web?
That is the connection string that I was given from my host. It's not the
connection string that is the problem(yet) because if I even try to allocate
a MySqlCommand object like this MySqlCommand command = new MySqlCommand() I
will get the exception.

>
> I've only ever used the CoreLabs native .NET data provider, in which case
> the string would look something like:
>
> "User ID=root; Password=xxxxxx; Host=mysql4.brinkster.com; Port=3306;
> Database=xxxxxx;Direct=true; Protocol=TCP; Compress=false; Pooling=true;
Min
> Pool Size=0;Max Pool Size=100; Connection Lifetime=0"
>
>

I'm wondering if there are libraries in the MySql Server app that I need to
have?



Re: MySql ado.net connector problem by Mark

Mark
Wed Aug 03 10:40:08 CDT 2005

"Steve" <sss@sss.com> wrote in message
news:%23lNp7BEmFHA.3120@TK2MSFTNGP09.phx.gbl...

> That is the connection string that I was given from my host. It's not the
> connection string that is the problem(yet) because if I even try to
> allocate
> a MySqlCommand object like this MySqlCommand command = new MySqlCommand()
> I
> will get the exception.

Hmm - does the mySql object appear in the Object Browser? If you expand the
References folder under your project in the Solution Explorer, is it there
too?

> I'm wondering if there are libraries in the MySql Server app that I need
> to
> have?

Well, to use the CoreLabs native .NET data provider, all you have to do is:

1) install it (obviously!)

2) add a reference to it into your project



Re: MySql ado.net connector problem by Steve

Steve
Wed Aug 03 11:00:25 CDT 2005


"Mark Rae" <mark@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%2380hjGEmFHA.320@TK2MSFTNGP09.phx.gbl...
> "Steve" <sss@sss.com> wrote in message
> news:%23lNp7BEmFHA.3120@TK2MSFTNGP09.phx.gbl...
>
> > That is the connection string that I was given from my host. It's not
the
> > connection string that is the problem(yet) because if I even try to
> > allocate
> > a MySqlCommand object like this MySqlCommand command = new
MySqlCommand()
> > I
> > will get the exception.
>
> Hmm - does the mySql object appear in the Object Browser? If you expand
the
> References folder under your project in the Solution Explorer, is it there
> too?
Yes, it shows as "MySql.Data"

>
> > I'm wondering if there are libraries in the MySql Server app that I need
> > to
> > have?
>
> Well, to use the CoreLabs native .NET data provider, all you have to do
is:
>
> 1) install it (obviously!)
>
> 2) add a reference to it into your project
>
>
Sadly this is not an option for me. My web host only uses the .net
connector from mysql.com - so I'm stuck getting this to work somehow.

I tried adding the dll to by application's bin folder which I have seen
people suggest on the web. This just creates a whole new kind of error
(posted below)


<code>
Parser Error Message: File or assembly name 'MySql.Data,
Version=1.0.4.20163, Culture=neutral, PublicKeyToken=c5687fc88969c44d', or
one of its dependencies, was not found.

Source Error:

Line 9: </appSettings>
Line 10: <system.web>
Line 11: <compilation
Line 12: defaultLanguage="c#"
Line 13: debug="true"
</code>



Re: MySql ado.net connector problem by Mark

Mark
Wed Aug 03 12:41:30 CDT 2005

"Steve" <sss@sss.com> wrote in message
news:u1BM3REmFHA.1372@TK2MSFTNGP10.phx.gbl...

>> Well, to use the CoreLabs native .NET data provider, all you have to do
> is:
>>
>> 1) install it (obviously!)
>>
>> 2) add a reference to it into your project
>>
>>
> Sadly this is not an option for me. My web host only uses the .net
> connector from mysql.com - so I'm stuck getting this to work somehow.

Ah - sorry, then, but I think I'm out of options...

> I tried adding the dll to by application's bin folder which I have seen
> people suggest on the web. This just creates a whole new kind of error
> (posted below)
>
>
> <code>
> Parser Error Message: File or assembly name 'MySql.Data,
> Version=1.0.4.20163, Culture=neutral, PublicKeyToken=c5687fc88969c44d', or
> one of its dependencies, was not found.

Well, to me that looks very much like an incomplete or failed installation
of the .NET data provider. What did your ISP's tech support suggest...?