I am attempting to set up 2nd level caching for NHibernate 3.2 with Windows 
Azure Caching. So far,  using 
https://www.windowsazure.com/en-us/develop/net/how-to-guides/cache/, I have 
setup Azure caching in my web.config :

    <dataCacheClients>
     <dataCacheClient name="default">
      <autoDiscover isEnabled="true" identifier="App.UI" />
    </dataCacheClient>
  </dataCacheClients>

I then downloaded and added the Velocity cache provider DLLs from 
http://sourceforge.net/projects/nhcontrib/files/NHibernate.Caches/3.2.0.GA_for_NH3.2.0GA/

Finally, my hibernate.cfg.xml is: 

    <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
    <session-factory>
        ...
        <property name="cache.use_second_level_cache">true</property>
        <property name="cache.use_query_cache" >true</property>
        <property 
name="cache.provider_class">NHibernate.Caches.Velocity.VelocityProvider, 
NHibernate.Caches.Velocity</property>
    </session-factory>
    </hibernate-configuration> 

However, When I run the azure emulator, i get the error:
"could not instantiate CacheProvider: 
NHibernate.Caches.Velocity.VelocityProvider, NHibernate.Caches.Velocity"
 with inner error:

"Could not load file or assembly 'NHibernate, Version=3.2.0.4000, 
Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its 
dependencies. The located assembly's manifest definition does not match the 
assembly reference. (Exception from HRESULT: 0x80131040)":"NHibernate, 
Version=3.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4"

Which from what I found, seems to indicate that it cannot find the Cache 
Provider DLLs.

Anyone have any experience with deploying a velocity cache on azure and can 
point me in the right direction?

Thank you


-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to