Win7 ASP Connection database "no provider found. This program may not be correctly installed"

Source: Internet
Author: User
Tags driver manager

The connection string connecting ASP to the database is Provider = Microsoft. Jet. OLEDB.4.0; Data Source = path, which adopts the OleDB connection mode. The problem may be that the OleDB connection mode is used.

Then I searched for the network and got a solution. It turned out to be the reason for self-installed 64-bit Windows 7. By default, the 32-bit application is not enabled in the IIS application pool in a 64-bit environment. We only need to enable it. Open IIS 7, go to "application pool", select the program pool to connect to the database using OleDB, and set the 32-bit application to True.

Using MyODBC with ASP. NET in IIS7 on Vista x64

That's a heck of a title, but it's a problem I hit recently. I have a bunch of ASP. NET sites that use MySQL as their datastore, but I hadn't tried the on IIS7 yet. it took a while to get them to work at all (I had to set permissions on web. config and the other website files so that they cocould be read by both the Users group and the IIS_IUSRS group), but then I was left with an error about my MySQL connection. "ERROR [IM002] [Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified"-another very general error that basically means "Something is wrong with your ODBC driver, somewhere."

After some searching, I learned two things. the first is that if you're running 64-bit you can't use the standard ODBC Data Source Administrator in Administrative Tools with MySQL. you 've got to go to C: \ Windows \ SysWOW64 \ odbcad32.exe and set up your DSN, if that's your thing. the other thing is that the MyODBC driver is 32-bit only. so to use it at all, you need to make sure you're calling it from 32-bit apps only. that means you 've got to tweak the Application Pool you're using to run all its ASP. NET applications as 32-bit. to do this, go to Administrative Tools> Internet Information Services (IIS) Manager (or just hit the Windows key and type "IIS "). then go to "Application Pools" and select whichever application pool your ASP. NET app uses (or create a new one just for your MySQL apps. C Lick "Advanced Settings ..." And set "Enable 32-Bit Applications ". now the AppPool will use the 32-bit. net clr to run your app, and it'll be able to see your MyODBC driver (whether you use a DSN or not ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.