Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 504
  • Last Modified:

Urgent: Error accessing MySQL data (ASP.NET website) - production server only

Using VS 2008 SP1 with MySQL 5. Using DevArt's MyDirect.NET (latest version) to access the data.

Created a new, simple, asp.net web site. Created one new XSD dataset with one TableAdapter containing GetData. (I used the production server in my connectionstring, defined in the web.config.) Then I created one aspx page with a gridview which utilized GetData. On the local machine it runs perfectly.  Very simple website.

I uploaded all the files to the production server. When I go to the url I get this error. Any ideas?

Server Error in '/' 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="dsCompanyTypes" targetNamespace="http://tempuri.org/dsCompanyTypes.xsd" xmlns:mstns="http://tempuri.org/dsCompanyTypes.xsd" xmlns="http://tempuri.org/dsCompanyTypes.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: /App_Code/DAL/dsCompanyTypes.xsd    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
0
RobertNZana
Asked:
RobertNZana
  • 3
1 Solution
 
brwwigginsCommented:
Did you verify the asp.net version set for the website in IIS? I think by default it does 1.1

Open the IIS manager, right-click on the website or VD and go to properties. Double check the ASP.NET tab
0
 
RobertNZanaAuthor Commented:
Using IIS Manager (IIS V7) in Windows Server 6 SP1.

In Application Pools it shows up as v2.0.  Should v3.5 show up as "v3.5" or not?

I DEFINITELY need to use v3.5.  Let me look at it and get back to you in a second.  Please stick with me on this thread because it's really important to me.  Thanks!
0
 
RobertNZanaAuthor Commented:
Apparently the 3.0 and 3.5 are essentially extensions to the 2.0 system, and show as 2.0 in the IIS app pool display.

http://forums.iis.net/p/1147405/1861282.aspx

I think the problem is with MyDirect .NET provider, which gives me access to the MySql database.

Someone suggested that I manually add the provider to the web.config file, like this...
 <system.data>
  <DbProviderFactories>
   <add name="MyDirect .NET" invariant="CoreLab.MySql" description="CoreLab MyDirect .NET"
    type="CoreLab.MySql.MySqlDirectFactory, CoreLab.MySql" />
  </DbProviderFactories>
 </system.data>

But that didn't work either.  Any other ideas?
0
 
RobertNZanaAuthor Commented:
Actually that did work.

I also had to do a...

<remove name="CoreLab.MySql" /> before the add

Thanks and I hope this is useful to others...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now