ProviderException: Unable to load default cache provider

Mar 11, 2010 at 9:19 AM
Edited Mar 11, 2010 at 9:22 AM

Hi all,

I'm new member and new to MemCached also. I'm facing big problem from using MemCached, please help me to solve it. I've configured MemCached successfully in web.config. I've also configured MemCached in app.config of my VB.NET project also. Then in my VB.NET project (not in Websites), I have a test vb class for using MemCache like below:

Imports MemcachedProviders.Cache

<Serializable()> _
Public Class CCacheManager
 Public Function HelloWorld() As String
   If DistCache.Get("hello_world") Is Nothing Then
    DistCache.Add("hello_world", "Hello World")
   End If

   Return CStr(DistCache.Get("hello_world"))
 End Function
 End Class

Then I have an aspx page to call that HelloWorld function from CCacheManager class in that VB.NET project. This page threw exception like below:

[ProviderException: Unable to load default cache provider]
MemcachedProviders.Cache.DistCache.LoadProvider() +290

...........

Please help me, what should I do? I've configured MemCached in app.config of that VB.NET project is as same as in web.config:

<configSections>
 <section name="cacheProvider" type="MemcachedProviders.Cache.CacheProviderSection, MemcachedProviders"
        allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>
        <sectionGroup name="enyim.com">
          <section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
        </sectionGroup>
    </configSections>
    <cacheProvider defaultProvider="MemcachedProvider">
     <providers>
        <add name="MemcachedCacheProvider" type="MemcachedProviders.Cache.MemcachedCacheProvider,MemCachedProviders"
     socketTimeout="1000" keySuffix ="_MySuffix_" defaultExpireTime="2000"/>
     </providers>
    </cacheProvider>
    <enyim.com>
     <memcached>
        <servers>
          <add address="127.0.0.1" port="11211"></add>
        </servers>
        <socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:10:00" deadTimeout="00:20:00"></socketPool>
     </memcached>
    </enyim.com>
 

Even if I don't setup this config in app.config, it still throws exception like so. I'm using "Memcached Providers 1.2 .NET 3.5" along with "memcached-win32-1.4.4-14 for Win32".

Hope I can have your help.

Thanks so much.

Mar 12, 2010 at 1:44 AM

Anybody's here? Help me please, it's really urgent :((

Coordinator
Mar 12, 2010 at 1:31 PM

Hi,
Can you email me your project at (fahadaz at gmail.com).
- Fahad