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.

asked 07 May '10, 11:42

Zote's gravatar image

Zote
1.7k364050
accept rate: 43%

edited 28 Sep '11, 12:08

Volker%20Barth's gravatar image

Volker Barth
30.6k304455662


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

Thank you.

permanent link

answered 16 May '10, 14:40

Zote's gravatar image

Zote
1.7k364050
accept rate: 43%

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.

permanent link

answered 11 May '10, 01:41

Minghai%20Chang's gravatar image

Minghai Chang
12633
accept rate: 20%

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

(11 May '10, 01:58) Zote
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×137
×65
×5

question asked: 07 May '10, 11:42

question was seen: 4,853 times

last updated: 28 Sep '11, 12:08