ProviderIncompatibleException in access to ASP.NET MVC app

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
kensugi
Posts: 3
Joined: Wed 03 Aug 2011 04:24

ProviderIncompatibleException in access to ASP.NET MVC app

Post by kensugi » Wed 03 Aug 2011 04:56

We got ProviderIncompatibleException when we access to asp.net mvc application deployed to IIS 7 on Windows 2008 R2.

The application is explicitly compiled as 32 bit application and Oracle client installed on this host is 32bit also.Tying to resolve this exception, we've installed dotConnect for Oracle completely, but we got same error.
In development environment we have NOT got this error.

Does we have this error because of lack of license ? If so, could you let me know how to import license in case of our application whose architecture is explained at FYI ?

Best regards.

FYI the followings are are deployment environment.
  • OS: windows 2008 R2 (64bit)

    IIS: ver.7
    ASP.NET MVC: ver.3
    Entity Framework: June CTP
    Application architecture:
    ASP.NET MVC web appliation has reference to Repository class library in which dotConnect for Oracle is used.
    In web.config we've declared Devart.Data.Oracle in DbProviderFactories section as followings.

    Code: Select all

          
          
    
    Exception message: System.Data.ProviderIncompatibleException: A null was returned after calling the 'GetService' method on a store provider instance of type 'Devart.Data.Oracle.OracleProviderFactory'. The store provider might not be functioning correctly.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 03 Aug 2011 14:08

1. This exception occurs when you deploy your application with the Devart assemblies which are not from Professional (or Developer) edition OR not of the version you have specified in DbProviderFactories (6.30.196).

2. Make sure that Devart.Data.dll v 5.0.295, Devart.Data.Oracle.dll v 6.30.196, and Devart.Data.Oracle.Entity.dll v 6.30.196 (EFv1 or EFv4) are available for your application. These assemblies have to reside in GAC or in the application's folder.

3. The following permissions are required by dotConnect for Oracle as partially trusted code (this is actual for web projects):
a) in Direct mode - medium trust plus SocketPermission;
b) in OCI mode - medium trust plus ReflectionPermission, RegistryPermission, EnvironmentPermission for PATH environment variable, FileIOPermission for Oracle Client.
kensugi wrote:Does we have this error because of lack of license ? If so, could you let me know how to import license in case of our application whose architecture is explained at FYI ?
No, this is not the case.

kensugi
Posts: 3
Joined: Wed 03 Aug 2011 04:24

Post by kensugi » Thu 04 Aug 2011 02:13

Hello, Shalex.

We've encountered same exception still now.
1. This exception occurs when you deploy your application with the Devart assemblies which are not from Professional (or Developer) edition OR not of the version you have specified in DbProviderFactories (6.30.196).
The application package is generated by Visual Studio 2010 in which dotConnect for Oracle professional downloaded from devart Registered User's Area has been installed. In our application architecture case, because repository shared class library only refers Devart.Data.Oracle, we've explicitly added references to Devart.Data.dll, Devart.Data.Oracle.dll and Devart.Data.Oracle.Entity.dll in ASP.NET MVC application and make those assemblies to be copied at local folder.
2. Make sure that Devart.Data.dll v 5.0.295, Devart.Data.Oracle.dll v 6.30.196, and Devart.Data.Oracle.Entity.dll v 6.30.196 (EFv1 or EFv4) are available for your application. These assemblies have to reside in GAC or in the application's folder.
On deployment host, those assemblies are in application root/bin folder.
3. The following permissions are required by dotConnect for Oracle as partially trusted code (this is actual for web projects):
a) in Direct mode - medium trust plus SocketPermission;
b) in OCI mode - medium trust plus ReflectionPermission, RegistryPermission, EnvironmentPermission for PATH environment variable, FileIOPermission for Oracle Client.
IIS on deployment host has fully trusted application. In our application anonymous authentication is used, do we need to explicitly apply read and execute permission to those three devart assemblies for IUSR ?

Thanks in advance.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 05 Aug 2011 12:20

We have implemented some changes in our code which can help to avoid this problem. This will be included in the next public build. If possible, send us a small test project to reproduce the issue in our environment (we cannot identify the reason of the problem at the moment).

kensugi
Posts: 3
Joined: Wed 03 Aug 2011 04:24

Post by kensugi » Thu 11 Aug 2011 00:59

Hello,

In other member development environment we've faced same issue.

Can we try your new implementation ahead of public release ? If so, we can coordinate with you to address this issue.

Anyway in my development environment, some devart assemblies, which are same version, are installed in two other folders as followings, is this what you intend ?
  • Devart.Data
    - d:\Program Files(x86)\Devart\dotConnect\Oracle\Devart.Data.dll
    - d:\Program Files(x86)\Common Files\Devart\dotConnect\5.00\Net2\Common\Devart.Data.dll
    Devart.Data.Oracle
    - d:\Program Files(x86)\Devrt\dotConnect\Oracle\Devart.Data.Oracle.dll
    - d:\Program Files(x86)\Common Files\Devart\dotConnect\5.00\Net2\Common\Devart.Data.Oracle.dll
    Devart.Data.Oracle.Entity
    - d:\Program Files(x86)\Devart\dotConnect\Oracle\Entity\EF1\Devart.Data.Oracle.dll
    - d:\Program Files(x86)\Devart\dotConnect\Oracle\Entity\EF4\Devart.Data.Oracle.Entity.dll

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 12 Aug 2011 11:06

The new (6.30.202) build of dotConnect for Oracle is available for download. Please try it and notify us about the results.
kensugi wrote:Anyway in my development environment, some devart assemblies, which are same version, are installed in two other folders as followings, is this what you intend ?
This is OK.

> Devart.Data
> Devart.Data.Oracle
These assemblies include a common data access level for several our tools. So they are also available in the \Program Files(x86)\Common Files\ folder.

> Devart.Data.Oracle.Entity
There are two versions of this assembly - the one from the EF1 folder is for Entity Framework version 1, another is for Entity Framework version 4 (the EF4 folder).

Post Reply