Dataset using MySql renders "Parser Error"

F

filip.norrgard

Hi All!

I've been developing an ASP.Net 2.0 web application using the Visual
Studio 2005 tools. Currently datagrids on a page are filled with data
from a dataset (a .xsd file in the "project") that, in turn, gets the
data from MySql server.

Locally testing it on my PC (Windows XP SP2, FYI) it works and no
errors appear. However, when I upload it to the webserver (Windows 2003
Web Edit. Server) I get the a parser error on the dataset file. The
server reports parser error on the first line of the dataset file which
reads: <?xml version="1.0" encoding="utf-8"?>

Now, I've installed and repaired the MySql .NET Connector (latest
version downloaded, just to be on the safe side) and tested that my
connection strings are working. The tests indicated that all seems
right and working to me. The MySql server on the W2003 server is filled
with exactly the same data as I have on the local PC.

Can anyone give tips or pointers to what I should do to get the dataset
working on the W2003 server? I don't think this is MySql specific, but
you can try to prove me wrong. :-D

Here is the full error message from the error page:
======================================================

Server Error in '/test' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource
required to service this request. Please review the following specific
parse error details and modify your source file appropriately.

Parser Error Message: Failed to generate code. Exception of type
'System.Data.Design.InternalException' was thrown.

Source Error:


Line 1: <?xml version="1.0" encoding="utf-8"?>
Line 2: <xs:schema id="DataSet1"
targetNamespace="http://tempuri.org/DataSet1.xsd"
xmlns:mstns="http://tempuri.org/DataSet1.xsd"
xmlns="http://tempuri.org/DataSet1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"
attributeFormDefault="qualified" elementFormDefault="qualified">
Line 3: <xs:annotation>


Source File: /test/App_Code/DataSet1.xsd Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

======================================================


Regards,

Filip Norrgård
 
F

Filip

An update to the problem:

I set the local computer to connect to the server's MySQL database and
the site is working when I am running it locally. I uploaded the whole
website (including the new connection strings and updated datasets) to
the server, but it _still_ doesn't work. I get the exact same parser
error when I try to use the site on the web server.

Is this a problem with the MySql .Net connector installation on the
server, or something more sneaky going on? :-?
Is there any better way of diagnosing the problem? (The parser error
message doesn't help me much...)


Cheers,

Filip Norrgård
 
?

=?iso-8859-1?q?Filip_Norrg=E5rd?=

Hi again,

After spending too much time looking for the fault, I believe to have
found a possible cause of the problem.

It seems that something (possibly MySql's .Net Connector installer)
installs MySql.Data.dll and MySql.VisualStudio.dll to the .Net
assembly. (You can view them at %windir%\assembly. The version of the
DLL's are 2.0.0.0 and their public keys are both the same --
1c274e146b3988b5 .

Now for the strange part: I can't find the assemblies themselves! I've
searched through the whole hard drive for the file, but none can be
found. The Mysql.Data.dll that resides in the .Net 2.0 folder of the
Mysql .Net Connector directory, is only version 1.0.7.30072 and a whole
other public key.

Futhermore, when running the command "gacutil -lr MySql.Data" in the
Visual Studio command prompt I get the following listing:

MySql.Data, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=1c274e146b3988b5, processorArchitecture=MSIL

MySql.Data, Version=1.0.7.30071, Culture=neutral,
PublicKeyToken=c5687fc88969c44d SCHEME: <WINDOWS_INSTALLER> ID: <MSI>
DESCRIPTION : <Windows Installer>

MySql.Data, Version=1.0.7.30072, Culture=neutral,
PublicKeyToken=c5687fc88969c44d SCHEME: <WINDOWS_INSTALLER> ID: <MSI>
DESCRIPTION : <Windows Installer>


Notice that the 2.0 version of the MySql.Data assembly has apparently
not been installed by the MySql .Net Connector installer?

The question remains, where did the surprising assembly MySql.Data 2.0
come from, if not the installer? The 2.0 version has not been installed
on the server (by the MySql installer) and hence I believe it is the
reason for why I get the parser error in the first place.

Any tips are warmly welcome! :)

Regards,

Filip Norrgård
 
?

=?iso-8859-1?q?Filip_Norrg=E5rd?=

Ah-ha! Found the source of the mystery MySql.Data 2.0 assembly:
http://www.skakkinostri.it/mysql/

Somehow, I had managed to forget that I had installed it earlier this
year (must have been during those days when the temperature rose close
to 30 degrees Celsius here) and it remained working too nicely for me
to remember ever installing it. *oops*

Anyways, case closed. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top