Asp .NET providers

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Asp .NET providers

Post by JoeRuspante » Wed 01 Sep 2010 00:16

Hi everybody.
I'm trying to use the ASP .NET providers (Membership/Role/...)

I did this steps:

1) Installed the "full" version of dotConnect (I'm trying in my developer machine where OracleXE is installed)

2) Run the script for create the tables in my DB

3) Create a new "ASP .Net Web Application" on Visual Studio 2010

4) Changed the web.config for use the Devart providers (like I find in the Devart web pages). I put my web.config later in this post

5) Run the application. The error "Could not load type 'Devart.Data.Oracle.Web.Providers.OracleRoleProvider' " appears


Someone could help me?

This is my web.config


Code: Select all

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <connectionStrings>
    <add name="OracleServices"
         connectionString="User Id=myuser;Password=mypwd;Data Source=localhost;Direct=true" />
  </connectionStrings>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />

    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>

    <membership defaultProvider="AspNetOracleMembershipProvider"
      userIsOnlineTimeWindow="15">
      <providers>
        <clear />
        <add
          name="AspNetOracleMembershipProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleMembershipProvider"
          connectionStringName="OracleServices"
          enablePasswordRetrieval="false"
          enablePasswordReset="true"
          requiresQuestionAndAnswer="true"
          requiresUniqueEmail="false"
          passwordFormat="Hashed"
          maxInvalidPasswordAttempts="5"
          passwordAttemptWindow="10" />
      </providers>
    </membership>

    <profile defaultProvider="AspNetOracleProfileProvider" >
      <providers>
        <clear />
        <add
          name="AspNetOracleProfileProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleProfileProvider"
          connectionStringName="OracleServices" />
      </providers>
      <properties>
        <add name="ZipCode" />
        <add name="CityAndState" />
      </properties>
    </profile>

    <roleManager defaultProvider="AspNetOracleRoleProvider"
      enabled="true"
      cacheRolesInCookie="true"
      cookieName=".ASPROLES"
      cookieTimeout="30"
      cookiePath="/"
      cookieProtection="All" >
      <providers>
        <clear/>
        <add
          name="AspNetOracleRoleProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleRoleProvider"
          connectionStringName="OracleServices" />
      </providers>
    </roleManager>

  </system.web>

  <system.webServer>
     <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

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

Post by Shalex » Wed 01 Sep 2010 07:17

The 'Devart.Data.Oracle.Web.Providers.OracleRoleProvider' type is defined in the Devart.Data.Oracle.Web.dll assembly. Please add reference to this assembly to your project (also to Devart.Data.dll and Devart.Data.Oracle.dll). Here is the corresponding topic in our documentation: http://www.devart.com/dotconnect/oracle ... yment.html.

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Wed 01 Sep 2010 16:54

Sorry... I missed to write that step, but I Referenced:

Devart.Data.dll
Devart.Data.Oracle.dll
Devart.Data.Oracle.Web.dll


When I found 2 dll in the ".NET" tab of the window of VS2010, I choose the one in "c:\Program File\Devart..." and not the one in "C:\Common File\...."

I try to choose the other one, but I have the same problem.

Devart.Data is version 5.0.105.0
Devart.Data.Oracle and Devart.Data.Oracle.Web are version 5.70.152.0


Thank you in advance

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

Post by Shalex » Thu 02 Sep 2010 15:47

1. Could you please make sure that Devart.Data.Oracle.Web.dll is available in your deployment environment and loaded to the process of your application?
2. Are there any inner exceptions?

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Thu 02 Sep 2010 16:00

1) How can I test it? I'm using the "run" button of the VS2010 in the machine where I installed the full DotConnect for Oracle. So I think my environment has everything it needs. If there are any steps to do, could you tell me what have I to do?

2) I see the ASP error page and I don't see any inner exception

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

Post by Shalex » Fri 03 Sep 2010 12:00

1) If you want to see the loaded assemblies to the process of your application, it is necessary to set a break point in your code and then (when debugger reaches this line) navigate to the Debug > Windows > Modules menu item of Visual Studio.

2) If an output doesn't contain an inner exception, it can be obtained by wrapping your code in the try...catch block and outputting the content of the Exception.InnerException property.

We have reproduced the issue that the Devart.* assemblies are not loaded to the process of web application if their references are added to the ASP.NET Web Application with the Copy Local=false option (Copy Local=true thows different exception in 5.70.152).

As a workaround, please use the 5.60.124 version of dotConnect for Oracle with the Copy Local=true option for the Devart.* assemblies.

I will post here when the problem is fixed.

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Sat 04 Sep 2010 13:15

Thank you very much...

But, where can I find it? In my download page I can't see it... I have only the 5.70.152 and the beta of the 6... No 5.60 on it

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

Post by Shalex » Tue 07 Sep 2010 10:33

Please navigate via interface of Registered Users' Area: click on the version's number link on the Licenses page > click the here link in the Previous Versions section of the Download page > choose the version you are interested in. If you encoutner any difficulties when downloading this version, please contact our sales department (sales at devart*com).

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Tue 07 Sep 2010 23:51

I tried it... But it doesn't seem to work... Same problem as the new version.

For the test, I uninstalled the new version of DotConnect and installed the one you told me.

Back to VS2010, and created a new project (ASP .NET Web application)


It doesn't seem to work.

May you send me a project (very simple) that works? (joeruspante at me.com)

Else, I can send you my project that doesn't work...

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Wed 08 Sep 2010 08:32

Sorry!!!!
I forgot to set "copy local" to true... Now it seems to work.

Thank you very much!

Let me know when the issue will be resolved also in the new version of DotConnect.

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

Post by Shalex » Wed 08 Sep 2010 12:40

1. Please make sure that you have set the Copy Local=true property for the Devart.* assemblies in the References node of Solution Explorer.
2. Remove the policy.*.Devart.* files from your GAC.
3. I have sent you a test project by e-mail. It works in my environment with the 5.60.124 version of dotConnect for Oracle.

If the problem persists, please post here the exact text of the error.

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

Post by Shalex » Wed 08 Sep 2010 12:41

Ok. I will notify you when the problem is fixed.

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

Post by Shalex » Wed 22 Sep 2010 14:14

Please change your web.config (from the first post in this thread) in the following way to make the assemblies be loaded to the process of your application when Copy Local = false:

Code: Select all

...
          name="AspNetOracleMembershipProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleMembershipProvider" 
...
          name="AspNetOracleProfileProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleProfileProvider"
...
          name="AspNetOracleRoleProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleRoleProvider"
...
-->

Code: Select all

...
          name="AspNetOracleMembershipProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleMembershipProvider, Devart.Data.Oracle.Web, Version=5.70.152.0, Culture=neutral, PublicKeyToken=09af7300eec23701" 
...
          name="AspNetOracleProfileProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleProfileProvider, Devart.Data.Oracle.Web, Version=5.70.152.0, Culture=neutral, PublicKeyToken=09af7300eec23701"
...
          name="AspNetOracleRoleProvider"
          type="Devart.Data.Oracle.Web.Providers.OracleRoleProvider, Devart.Data.Oracle.Web, Version=5.70.152.0, Culture=neutral, PublicKeyToken=09af7300eec23701"
...
Change 5.70.152 here with your current version.

Post Reply