469,318 Members | 1,968 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,318 developers. It's quick & easy.

Dataset using MySql renders "Parser Error"

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"
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

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

Filip Norrgård

Aug 18 '06 #1
3 2788
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...)

Filip Norrgård

Aug 21 '06 #2
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 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 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=, Culture=neutral,
PublicKeyToken=1c274e146b3988b5, processorArchitecture=MSIL

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

MySql.Data, Version=, 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! :-)


Filip Norrgård

Aug 21 '06 #3

Ah-ha! Found the source of the mystery MySql.Data 2.0 assembly:

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. :)

Aug 22 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by marknewbery | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.