1

I have an Azure cloud service comprising one Web Role and a Cache Worker Role. The web role runs fine except when I try to add a session state provider that uses the cache worker:

<sessionState mode="Custom" customProvider="AFCacheSessionStateProvider">
  <providers>
    <add name="AFCacheSessionStateProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" dataCacheClientName="default" applicationName="AFCacheSessionState"/>
  </providers>
</sessionState>

<dataCacheClients>
    <dataCacheClient name="default">
    <autoDiscover isEnabled="true" identifier="MyCacheWorkerRole" />
    <!--<localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />-->
</dataCacheClient>

When I try to debug, the Azure compute emulator fires up, the browser opens, but the page never loads - just a loading spinner for a couple of minutes, then a single line: "The page cannot be displayed because an internal server error has occurred."

If I uncomment the "localCache" line above (I'm not sure what it's meant to do), I get a "not running a hosted service or the Development Fabric" message. The cloud service is set up as the startup project

----- EDIT ----

I get the same behaviour when I try to point to a Windows Azure Cache Service instead of a cache worker role.

user888734
  • 3,797
  • 5
  • 36
  • 67
  • Can you check this thread and see if it resolves your problem: http://stackoverflow.com/questions/22929837/role-instances-are-taking-longer-than-expected-to-start/22930844#22930844. – Gaurav Mantri Apr 14 '14 at 14:04
  • Thanks, but I'm afraid not. I have "Enable Caching" only switched on for the Cache Worker Role, because I'm trying to use the dedicated role setting. – user888734 Apr 14 '14 at 14:26

0 Answers0