Mono - getting assembly error with Devart.Data.Oracle.Web

Mono - getting assembly error with Devart.Data.Oracle.Web

Postby gustavp » Thu 28 Jul 2011 09:05

Every time I try to use providers with Oracle on Mono, I get errors.
It happens as soon as I add Devart.Data.Oracle.Web to the project.

Even though I have no use for OraclePersonalizationProvider and OracleWebEventProvider, I get these errors.

Furthermore, It doesn't seem like my the MembershipProvider works properly, this might be connected.

I get the following error:

Server Error in '/' Application
Could not load type 'Devart.Data.Oracle.Web.Providers.OraclePersonalizationProvider' from assembly 'Devart.Data.Oracle.Web, Version=6.30.185.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.

Description: HTTP 500. Error processing request.

Stack Trace:

System.TypeLoadException: Could not load type 'Devart.Data.Oracle.Web.Providers.OraclePersonalizationProvider' from assembly 'Devart.Data.Oracle.Web, Version=6.30.185.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.
at (wrapper managed-to-native) System.Type:type_is_assignable_from (System.Type,System.Type)
at System.Type.IsAssignableFrom (System.Type c) [0x00096] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System/Type.cs:885
at System.Web.Mvc.AreaRegistration.IsAreaRegistrationType (System.Type type) [0x00000] in :0
at System.Web.Mvc.TypeCacheUtil+<>c__DisplayClass1.b__0 (System.Type type) [0x00000] in :0
at System.Linq.Enumerable+c__Iterator35`1[System.Type].MoveNext () [0x00059] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/System.Core/System.Linq/Enumerable.cs:3010
at System.Collections.Generic.List`1[System.Type].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System.Collections.Generic/List.cs:126
at System.Collections.Generic.List`1[System.Type]..ctor (IEnumerable`1 collection) [0x0002f] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System.Collections.Generic/List.cs:63
at System.Linq.Enumerable.ToList[Type] (IEnumerable`1 source) [0x00006] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/System.Core/System.Linq/Enumerable.cs:2847
at System.Web.Mvc.TypeCacheUtil.GetFilteredTypesFromAssemblies (System.String cacheName, System.Predicate`1 predicate, IBuildManager buildManager) [0x00000] in :0
at System.Web.Mvc.AreaRegistration.RegisterAllAreas (System.Web.Routing.RouteCollection routes, IBuildManager buildManager, System.Object state) [0x00000] in :0
at System.Web.Mvc.AreaRegistration.RegisterAllAreas (System.Object state) [0x00000] in :0
at System.Web.Mvc.AreaRegistration.RegisterAllAreas () [0x00000] in :0
at Pricespy.MvcApplication.Application_Start () [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d5] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System.Reflection/MonoMethod.cs:226

Version information: Mono Runtime Version: 2.10.1 (tarball Wed Feb 23 20:24:55 UTC 2011); ASP.NET Version: 4.0.30319.1

Edit:
I am using the newest version of dotConnect for Oracle (pro edition).
gustavp
 
Posts: 10
Joined: Wed 13 Jul 2011 08:44

Re: Mono - getting assembly error with Devart.Data.Oracle.Web

Postby gustavp » Mon 01 Aug 2011 07:22

gustavp wrote:Every time I try to use providers with Oracle on Mono, I get errors.
It happens as soon as I add Devart.Data.Oracle.Web to the project.

Even though I have no use for OraclePersonalizationProvider and OracleWebEventProvider, I get these errors.

Furthermore, It doesn't seem like my the MembershipProvider works properly, this might be connected.

I get the following error:

Server Error in '/' Application
Could not load type 'Devart.Data.Oracle.Web.Providers.OraclePersonalizationProvider' from assembly 'Devart.Data.Oracle.Web, Version=6.30.185.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.

Description: HTTP 500. Error processing request.

Stack Trace:

System.TypeLoadException: Could not load type 'Devart.Data.Oracle.Web.Providers.OraclePersonalizationProvider' from assembly 'Devart.Data.Oracle.Web, Version=6.30.185.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.
at (wrapper managed-to-native) System.Type:type_is_assignable_from (System.Type,System.Type)
at System.Type.IsAssignableFrom (System.Type c) [0x00096] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System/Type.cs:885
at System.Web.Mvc.AreaRegistration.IsAreaRegistrationType (System.Type type) [0x00000] in :0
at System.Web.Mvc.TypeCacheUtil+<>c__DisplayClass1.b__0 (System.Type type) [0x00000] in :0
at System.Linq.Enumerable+c__Iterator35`1[System.Type].MoveNext () [0x00059] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/System.Core/System.Linq/Enumerable.cs:3010
at System.Collections.Generic.List`1[System.Type].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System.Collections.Generic/List.cs:126
at System.Collections.Generic.List`1[System.Type]..ctor (IEnumerable`1 collection) [0x0002f] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System.Collections.Generic/List.cs:63
at System.Linq.Enumerable.ToList[Type] (IEnumerable`1 source) [0x00006] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/System.Core/System.Linq/Enumerable.cs:2847
at System.Web.Mvc.TypeCacheUtil.GetFilteredTypesFromAssemblies (System.String cacheName, System.Predicate`1 predicate, IBuildManager buildManager) [0x00000] in :0
at System.Web.Mvc.AreaRegistration.RegisterAllAreas (System.Web.Routing.RouteCollection routes, IBuildManager buildManager, System.Object state) [0x00000] in :0
at System.Web.Mvc.AreaRegistration.RegisterAllAreas (System.Object state) [0x00000] in :0
at System.Web.Mvc.AreaRegistration.RegisterAllAreas () [0x00000] in :0
at Pricespy.MvcApplication.Application_Start () [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d5] in /usr/src/redhat/BUILD/mono-2.10.1/mcs/class/corlib/System.Reflection/MonoMethod.cs:226

Version information: Mono Runtime Version: 2.10.1 (tarball Wed Feb 23 20:24:55 UTC 2011); ASP.NET Version: 4.0.30319.1

Edit:
I am using the newest version of dotConnect for Oracle (pro edition).


By the way, the project works under mono if I press F5 a few times, but every time i restart apache, I get the errors until I have reloaded the page 3 times. It seems very strange that all other provider work fine, but mono complains about these 2 missing assemblies.

I can provide a test solution, but it will only be reproduceable on a mono server.
gustavp
 
Posts: 10
Joined: Wed 13 Jul 2011 08:44

Postby Shalex » Mon 01 Aug 2011 12:38

I cannot reproduce the problem in our environment (Mono v 2.10.2). I have used the following Membership provider registration in web.config:
Code: Select all
<configuration>
  <connectionStrings>
      <clear/>
      <add name="OracleServices" connectionString="Direct=true;server=IP_address;sid=***;User Id=***;Password=***;"/>
   </connectionStrings>
  <system.web>
    ...
    <membership defaultProvider="AspNetOracleMembershipProvider" userIsOnlineTimeWindow="15">
         <providers>
            <clear/>
            <add name="AspNetOracleMembershipProvider" type="Devart.Data.Oracle.Web.Providers.OracleMembershipProvider, Devart.Data.Oracle.Web, Version=6.30.196.0, Culture=neutral, PublicKeyToken=09af7300eec23701" connectionStringName="OracleServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"/>
         </providers>
      </membership>
  </system.web>
</configuration>

The project type is ASP.NET Web Application. The Devart.Data.dll, Devart.Data.Oracle.dll, Devart.Data.Oracle.Web.dll assemblies are placed in the bin folder of application. As licensing cannot be done directly under Mono, the license resource was generated on Windows and added to the project on Linux as an embedded resource: http://www.devart.com/dotconnect/oracle/docs/Licensing.html#compile.
Also please refer to http://www.devart.com/dotconnect/oracle/docs/?AspProviders.html.

If this doesn't help, please send us a small test project to reproduce the issue in our environment.
Shalex
Devart Team
 
Posts: 7709
Joined: Thu 14 Aug 2008 12:44

still getting the strange error

Postby gustavp » Wed 03 Aug 2011 08:16

Shalex wrote:I cannot reproduce the problem in our environment (Mono v 2.10.2). I have used the following Membership provider registration in web.config:
Code: Select all
<configuration>
  <connectionStrings>
      <clear/>
      <add name="OracleServices" connectionString="Direct=true;server=IP_address;sid=***;User Id=***;Password=***;"/>
   </connectionStrings>
  <system.web>
    ...
    <membership defaultProvider="AspNetOracleMembershipProvider" userIsOnlineTimeWindow="15">
         <providers>
            <clear/>
            <add name="AspNetOracleMembershipProvider" type="Devart.Data.Oracle.Web.Providers.OracleMembershipProvider, Devart.Data.Oracle.Web, Version=6.30.196.0, Culture=neutral, PublicKeyToken=09af7300eec23701" connectionStringName="OracleServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10"/>
         </providers>
      </membership>
  </system.web>
</configuration>

The project type is ASP.NET Web Application. The Devart.Data.dll, Devart.Data.Oracle.dll, Devart.Data.Oracle.Web.dll assemblies are placed in the bin folder of application. As licensing cannot be done directly under Mono, the license resource was generated on Windows and added to the project on Linux as an embedded resource: http://www.devart.com/dotconnect/oracle/docs/Licensing.html#compile.
Also please refer to http://www.devart.com/dotconnect/oracle/docs/?AspProviders.html.

If this doesn't help, please send us a small test project to reproduce the issue in our environment.


My project is an MVC3 Web Application.
I just upgraded to 196 (formerly 185).
I still have the problems.

I can use the membershipprovider fine, but only when I have updated the page a few times, getting first
error #1)
Code: Select all
Could not load type 'Devart.Data.Oracle.Web.Providers.OraclePersonalizationProvider' from assembly 'Devart.Data.Oracle.Web, Version=6.30.196.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.

secondly
error #2)
Code: Select all
Could not load type 'Devart.Data.Oracle.Web.Providers.OracleWebEventProvider' from assembly 'Devart.Data.Oracle.Web, Version=6.30.196.0, Culture=neutral, PublicKeyToken=09af7300eec23701'.


After this, the page runs as expected until I restart Apache.
My connectionstring looks like this:
Code: Select all
<add name="app2Connection"
         connectionString="User Id=xxx;Password=xxx;Server=xxx;Home=orahome;Connection Lifetime=10;Validate Connection=True;Direct=True;Statement Cache Size=5000;Sid=xxx;Persist Security Info=True;Clientid=app2_Anonymous;" />


Membershipprovider:

Code: Select all
<membership defaultProvider="AspNetOracleMembershipProvider">
      <providers>
        <clear/>
        <add name="AspNetOracleMembershipProvider"
             type="Devart.Data.Oracle.Web.Providers.OracleMembershipProvider, Devart.Data.Oracle.Web, Version=6.30.196.0, Culture=neutral, PublicKeyToken=09af7300eec23701"
             connectionStringName="app2Connection"
             enablePasswordRetrieval="false"
             enablePasswordReset="true"
             requiresQuestionAndAnswer="false"
             requiresUniqueEmail="true"
             passwordFormat="Hashed"
             maxInvalidPasswordAttempts="5"
             minRequiredPasswordLength="6"
             minRequiredNonalphanumericCharacters="0"
             passwordAttemptWindow="10"
             applicationName="xxx" />
      </providers>
    </membership>

I don't think it's a connection issue though, I can connect to the database - no problems, and the membershipprovider works fine.

I don't get any license errors, but could this be the issue?
I have a licenses.licx in the project, and everything else seems to work, except for the 2 errors described above.

I will send you a test project if you still have no idea what could cause this problem.

By the way, what version of mono are you running?

Mine is

Code: Select all
Version information: Mono Runtime Version: 2.10.1 (tarball Wed Feb 23 20:24:55 UTC 2011); ASP.NET Version: 4.0.30319.1
gustavp
 
Posts: 10
Joined: Wed 13 Jul 2011 08:44

Postby Shalex » Thu 04 Aug 2011 09:34

gustavp wrote:I still have the problems.

Make sure that there are no Devart providers registrations in the <system.web><webParts><personalization> and <system.web><healthMonitoring> sections in your application's web.config and global web.config (\etc\mono\_version_\web.config). If this doesn't help, please send us a small test project to reproduce the issue in our environment.

gustavp wrote:I don't get any license errors, but could this be the issue?

This is not the case.
gustavp wrote:I have a licenses.licx in the project, and everything else seems to work

As licensing cannot be done directly under Mono, the license resource should be generated on Windows and added to the project on Linux as an embedded resource: http://www.devart.com/dotconnect/oracle/docs/Licensing.html#compile.
gustavp wrote:By the way, what version of mono are you running?

Mono v 2.10.2. Tried ASP.NET v 2.0 and 4.0.
Shalex
Devart Team
 
Posts: 7709
Joined: Thu 14 Aug 2008 12:44

Postby gustavp » Mon 08 Aug 2011 09:25

Shalex wrote:Make sure that there are no Devart providers registrations in the <system.web><webParts><personalization> and <system.web><healthMonitoring> sections in your application's web.config and global web.config (\etc\mono\_version_\web.config). If this doesn't help, please send us a small test project to reproduce the issue in our environment.


I did this last week, Wednesday, but I have yet received only a confirmation reply. I attached a small test solution, and a link to this thread which describes the problem.
There are no references to webparts or personalizationprovider (and have never been, I have never used these).
I have looked in all config files on the server.

Shalex wrote:This is not the case.


Ok, didn't think so but thanks anyway, then that is out of the way.

Shalex wrote:As licensing cannot be done directly under Mono, the license resource should be generated on Windows and added to the project on Linux as an embedded resource: http://www.devart.com/dotconnect/oracle/docs/Licensing.html#compile.

I did that already, the licenses.licx I added because of frustration.


Shalex wrote:Mono v 2.10.2. Tried ASP.NET v 2.0 and 4.0.

Hm, ok...mine is 2.10.1, running MVC3 on 4.0

update:
I am now running it on mono 2.10.2
Version information: Mono Runtime Version: 2.10.2 (tarball Mon Apr 18 19:06:50 UTC 2011); ASP.NET Version: 4.0.30319.1

I can resend the test project again, if you didn't receive it for some reason.
I can also provide my global web.config, machine.config and everything else you might want to look at.
gustavp
 
Posts: 10
Joined: Wed 13 Jul 2011 08:44

Postby Shalex » Mon 08 Aug 2011 12:10

1. Sorry, but we have not received your e-mail. Please resend the test project again (include your global *.config files - we will try to recreate your environment) to http://www.devart.com/company/contact.html.

2. If possible, make sure that Devart.Data.Oracle.Web.dll of the corresponding version is loaded in the process of your application when these errors occur.

3. Refer to http://stackoverflow.com/questions/124841/could-not-load-type-from-assembly-error (maybe this will give an idea what can be wrong).

4. Try adding registration for Devart Personalization and Web Event providers in the web.config of your application (http://www.devart.com/dotconnect/oracle/docs/?AspProviders.html). Does it help?
Shalex
Devart Team
 
Posts: 7709
Joined: Thu 14 Aug 2008 12:44

Postby gustavp » Mon 08 Aug 2011 14:10

Shalex wrote:1. Sorry, but we have not received your e-mail. Please resend the test project again (include your global *.config files - we will try to recreate your environment) to http://www.devart.com/company/contact.html.

I have sent another request via the form.

Shalex wrote:2. If possible, make sure that Devart.Data.Oracle.Web.dll of the corresponding version is loaded in the process of your application when these errors occur.

I believe it is loaded. The Membershipprovider works after a few errors, and the errors do not come back until I restart apache, or touch the web.config file.

Shalex wrote:3. Refer to http://stackoverflow.com/questions/124841/could-not-load-type-from-assembly-error (maybe this will give an idea what can be wrong).

I searched the server for any devart files. the few I found, I promptly deleted. The problem persists.

Shalex wrote:4. Try adding registration for Devart Personalization and Web Event providers in the web.config of your application (http://www.devart.com/dotconnect/oracle/docs/?AspProviders.html). Does it help?

This doesn't seem to fix the problem. :-(

I hope you get my email this time.

Thanks.

/Gustav
gustavp
 
Posts: 10
Joined: Wed 13 Jul 2011 08:44

Postby Shalex » Wed 10 Aug 2011 16:09

We have answered you by e-mail.
Shalex
Devart Team
 
Posts: 7709
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle