cancel
Showing results for 
Search instead for 
Did you mean: 

The underlying provider failed on Open. - Only under IIS

Former Member
7,067

I'm working with .NET 4 MVC 2 and Entity Framework 4.

When I run my app under VS2010 web server, all works fine. When I try to run in IIS 7, I get this error

The underlying provider failed on Open.

How can I fix this? I tried to run application pool with my user account but I got no effect.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Build 2024 was released this days. I'll download it tomorrow and test if it solves my problem.

Thank you.

Answers (1)

Answers (1)

Former Member

The Entity Framework throws this exception if it can’t find the underlying ADO.NET provider. In the current release, we only ship one ADO.NET provider which can be used with .NET 2.0 / 3.0 / 3.5 / 4.0. SQL Anywhere installer adds this DLL into .NET 2.0 GAC and registers it in .NET 2.0 machine.config file. For .NET 4.0 applications, the Entity Framework should load the DLL from the 4.0 GAC. I would suggest :

  1. Add SQL Anywhere ADO.NET provider into .NET 4.0 GAC
  2. Register SQL Anywhere ADO.NET provider in .NET 4.0 machine.config file
  3. You can also use web.config file to specify assembly loading policy

In SQL Anywhere 12 and future 11 EBFs, we will ship three versions of SQL Anywhere ADO.NET provider. One for .NET 2.0 / 3.0, one for .NET 3.5, and one for .NET 4.0.

Former Member
0 Kudos

Hi @Minghai, can you gimme some samples of this steps? Do you have some plan when SA11 2024 EBF will be available? I saw at sybase site that it will fixed some EF4 problems. Thank you