Server Collection Cannot Be Empty Error When Using Azure AppFabric Caching in Winforms Application
I had a problem that unfortunately I've seen a few people run across when using the AppFabric caching feature of Windows Azure. This is the release version of the caching mechanism formerly known as Velocity. When you have a problem with the caching factory that it uses, most frequently the error message you will see thrown is along the lines of "server collection cannot be empty". Unfortunately that is another ubiquitous error that is frequently fairly difficult to track down. In this case it was even more perplexing - I had a compiled standalone assembly that was making use of the cache. When I called that assembly from an Azure worker role I wasn't getting any errors at all. However, when I added a reference to the assembly to my winforms test application and tried running it, I got the dreaded error.
After a fair amount of poking around, de-hairing my head one strand at a time, and soul searching (why am I here, why do I work on this stuff), it finally hit me what the problem was. Even though my winform app was not directly invoking the caching classes, it was the host process. All that means is that all of the cache configuration entries that were in my worker role application, had to be added to the app.config of my winforms application. Once I added them in everything worked fine.
This type of scenario is somewhat common I suppose, but since this error is such a pain to track down I thought I would capture here for folks caught in a similar predicament.
Comments
- Anonymous
January 01, 2003
The comment has been removed - Anonymous
October 16, 2014
8 minutes before FA Cup semi-finals last season M88 between Arsenal and Wigan in the end times as well as the future of Arsene Wenger appeared intense in the thoughts of fans and professionals. Meanwhile, the Gunners were leading 0-1 M88 :http://www.m88no.com/Main/Home.aspx?affiliateId=99156
also strategic Frenchman stood still in the streets piston.
If Arsenal's defeat meant that lasted some years no title to the number 10, Wenger will go. Despite efforts to convince the board from the previous M88 team, still apply professor "beg" day put pen to a contract extension. He wanted to put on an Emirates Cup before continuing "his tie" with Arsenal.
http://link138vip.blogspot.com
http://linkbodog88vip.blogspot.com
http://link188betvip.blogspot.com
http://dafa-bet.blogspot.com
http://dafa-bet.blogspot.com
http://link166betvip.blogspot.com
http://linkm88vip.blogspot.com - Anonymous
January 12, 2015
m88 :http://m88en.com/new-online-casino-deposit-bonus-codes-2015/
M88.com offer online sports games Asia, Sports Betting Asia, Sports Betting Sites Asia.
m88asia : http://m88en.net/m88-bet-mansion88-online-casino-online/
Link to M88BET phone: m88en.com. – Register and Open Betting Account and Membership M88BET.
m88bet : http://www.linkm88vip.com/2014/12/m88-asia-main-home-register-online-free.html
MANSION88 the house is one of the largest and most prestigious. Appeared quite early in the Asian market, the so-MANSION88 currently attracts more players.
link m88 : http://m88wiki.com/google-chrome-bookmarks-fastest-m88-link/
Home the M88 is the official sponsor of the football club in the Premier League
Wish you happy with the new M88
m88 casino online : http://m88free.com/register-m88-football-betting/