Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9241983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:29:04+00:00 2026-06-18T08:29:04+00:00

I’ve added the Windows Azure Cache 1.8.0 nuget package to my solution, but it

  • 0

I’ve added the Windows Azure Cache 1.8.0 nuget package to my solution, but it ends up crashing Visual studio when I load the project. I’ve found that I can “prevent” the crashing by removing the dlls from the bin folder, and then again when visual studio adds them back to the bin while the project loads.

The dlls I’m removing are:

Microsoft.ApplicationServer.Caching.AzureClientHelper.dll
Microsoft.ApplicationServer.Caching.AzureCommon.dll
Microsoft.ApplicationServer.Caching.Client.dll
Microsoft.ApplicationServer.Caching.Core.dll

When I look at the event viewer for the visual studio crash I get this:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
    Stack:
    at System.Threading.Monitor.Enter(System.Object)
    at Microsoft.ApplicationServer.Caching.DataCacheFactory.Close()
    at Microsoft.ApplicationServer.Caching.DataCacheFactory.Finalize()

I’m uncertain why VS is doing things with the dlls while the project is loading, but I admit I’m not an expert on that.

I’ve basically followed the process described on this page to add a dedicated cache worker role for caching:
http://www.windowsazure.com/en-us/develop/net/how-to-guides/cache/

I’ve tried removing and reinstalling the package, removing and reinstalling the Visual Studio SDK (Oct 2012), but the problem comes back.

Also, I don’t have the App Fabric Server installed.

Thanks in advance for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:29:05+00:00Added an answer on June 18, 2026 at 8:29 am

    In case anyone else runs into this problem, I’m providing what seemed to work for me here.

    In order to get visual studio to load the project, I removed the DLLs from the project. I also removed them as the project was loading and VS put the dlls back in the bin folder.

    I removed the references to the dlls. Then I removed my code that was using the datacachefactory.

    In the end I believe that it was caused by an improper use of the cache in my code that I had performed a build on. I was able to correct the usage of it, build the solution and get all the dlls back into the project.

    Previously by datacache object had not be static.

    here’s my correct usage of the datacache factory:

    using System;
    using Microsoft.ApplicationServer.Caching;
    
    
    namespace WebRole1.Classes
    {
        public class AzureCache
        {
            public static DataCache cache { get; set; }
            public static DataCacheFactory dataCacheFactory { get; set; }
    
        public AzureCache()
        {
            if (cache == null){
                DataCacheFactoryConfiguration cfg = new DataCacheFactoryConfiguration();
                cfg.AutoDiscoverProperty = new DataCacheAutoDiscoverProperty(true, "CacheWorkerRole1"); 
                dataCacheFactory = new DataCacheFactory(cfg);
                cache = dataCacheFactory.GetDefaultCache();
            }
        }
    
        public void Add(string item, object value)
        {                                                                              
           cache.Add(item, value);
        }
        public void Add(string item, object value, TimeSpan timeout)
        {
           cache.Put(item, value, timeout);
        }
        public object Get(string item)
        {   
            return cache.Get(item);
        }
    
        public TimeSpan TimeRemaining (string item)
        {
            DataCacheItem DCitem = cache.GetCacheItem(item);
            return DCitem.Timeout;
        }
    
        public void Flush()
        {
            cache.Clear();
            DataCacheFactory cacheFactory = new DataCacheFactory();
            cache = cacheFactory.GetDefaultCache();
    
        }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want to construct a data frame in an Rcpp function, but when I
I need to clean up various Word 'smart' characters in user input, including but
Let's say I'm outputting a post title and in our database, it's Hello Y’all
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.