title: Windows Azure Cache Service using old configuration
body: <p>The weirdest thing. I am switching over to SDK v1.7 and a new ACS and I get this weird error after I successfully login. It appears to be related to the SessionState provider for the Azure Cache Service.</p>
  
  <p>I am NOT using the Preview but I am using SDK 1.7 and I am using a Windows Azure account that has the Preview Features enabled.</p>
  
  <p>It's like something deep within the recesses of the ACS/Cache Service SDK is messed up.</p>
  
  <p>Here is my cache config:</p>
  
  <pre class="lang-xml prettyprint-override"><code>  &lt;dataCacheClients&gt;
      &lt;dataCacheClient name="default"&gt;
        &lt;tracing sinkType="DiagnosticSink" traceLevel="Verbose" /&gt;
        &lt;hosts&gt;
          &lt;host name="[[newCacheNamespace]].cache.windows.net" cachePort="22233" /&gt;
        &lt;/hosts&gt;
        &lt;securityProperties mode="Message"&gt;
          &lt;messageSecurity authorizationInfo="[[secret]]"&gt;
          &lt;/messageSecurity&gt;
        &lt;/securityProperties&gt;
      &lt;/dataCacheClient&gt;
      &lt;dataCacheClient name="SslEndpoint"&gt;
        &lt;tracing sinkType="DiagnosticSink" traceLevel="Verbose" /&gt;
        &lt;hosts&gt;
          &lt;host name="[[newCacheNamespace]].cache.windows.net" cachePort="22243" /&gt;
        &lt;/hosts&gt;
        &lt;securityProperties mode="Message" sslEnabled="true"&gt;
          &lt;messageSecurity authorizationInfo="[[secret]]"&gt;
          &lt;/messageSecurity&gt;
        &lt;/securityProperties&gt;
      &lt;/dataCacheClient&gt;
    &lt;/dataCacheClients&gt;
  </code></pre>
  
  <p>Here is my session state provider config:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider"&gt;
    &lt;providers&gt;
      &lt;add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" /&gt;
      &lt;add name="AppFabricCacheSessionStoreProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" useBlobMode="true" dataCacheClientName="default" /&gt;
    &lt;/providers&gt;
  &lt;/sessionState&gt;
  </code></pre>
  
  <p>Below is the error that I get:</p>
  
  <pre><code>Server Error in '/' Application.
  --------------------------------------------------------------------------------
  
  The remote name could not be resolved: '[[oldCacheNamespace]]-cache.accesscontrol.windows.net' 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
  Exception Details: System.Net.WebException: The remote name could not be resolved: '[[oldCacheNamespace]]-cache.accesscontrol.windows.net'
  
  Source Error: 
  
  An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
  
  Stack Trace: 
  
  
  [WebException: The remote name could not be resolved: '[[oldCacheNamespace]]-cache.accesscontrol.windows.net']
     System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data) +1243
     System.Net.WebClient.UploadValues(String address, String method, NameValueCollection data) +179
     Microsoft.ApplicationServer.Caching.AcsHelpers.GetToken(String serviceNamespace, String acsHostName, String issuerName, String issuerKey, String appliesTo) +523
  
  [DataCacheException: ErrorCode&lt;ERRCA0030&gt;:SubStatus&lt;ES0001&gt;:ACS request for token failed. One of the reasons could be an invalid authorization token.]
     Microsoft.ApplicationServer.Caching.AcsHelpers.GetToken(String serviceNamespace, String acsHostName, String issuerName, String issuerKey, String appliesTo) +1875
     Microsoft.ApplicationServer.Caching.ClientAcsSecurity.get_Token() +242
     Microsoft.ApplicationServer.Caching.CacheResolverChannel..ctor(CacheResolverCommunicatorType communicatorType, IDuplexSessionChannel innerChannel, DataCacheSecurity dataCacheSecurity) +559
  
  [CommunicationException: ErrorCode&lt;ERRCA0030&gt;:SubStatus&lt;ES0001&gt;:ACS request for token failed. One of the reasons could be an invalid authorization token.]
     Microsoft.ApplicationServer.Caching.CacheResolverChannel..ctor(CacheResolverCommunicatorType communicatorType, IDuplexSessionChannel innerChannel, DataCacheSecurity dataCacheSecurity) +833
     Microsoft.ApplicationServer.Caching.CacheResolverChannelFactory`1.System.ServiceModel.Channels.IChannelFactory&lt;TChannel&gt;.CreateChannel(EndpointAddress to) +274
     Microsoft.ApplicationServer.Caching.EndPointIdentityChannelFactory`1.System.ServiceModel.Channels.IChannelFactory&lt;TChannel&gt;.CreateChannel(EndpointAddress to) +186
     Microsoft.ApplicationServer.Caching.WcfClientChannel.CreateChannel(EndpointID endpoint) +557
     Microsoft.ApplicationServer.Caching.ChannelContainer.CreateChannel() +153
  
  [DataCacheException: ErrorCode&lt;ERRCA0017&gt;:SubStatus&lt;ES0006&gt;:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.)]
     Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody) +693
     Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCacheProperties(RequestBody request, SimpleSendReceiveModule sendRcvModule) +1194
     Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName) +701
     Microsoft.Web.DistributedCache.DataCacheFactoryWrapper.CreateDataCacheFromFactory(DataCacheFactory factory, String cacheName) +63
     Microsoft.Web.DistributedCache.CacheHelpers.RunCacheCreationHooks(CacheConnectingEventArgs fetchingEventArgs, IDataCacheFactory dataCacheFactory, Object sender, EventHandler`1 fetchingHandler, EventHandler`1 fetchedHandler) +356
     Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.CreateInternalProvider(IHttpRuntime httpRuntime, SessionInitializationData initData, IDataCacheFactory dataCacheFactory, EventHandler`1 cacheFetching, EventHandler`1 cacheFetched) +447
     Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.GetInternalProvider() +315
     Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider.CreateNewStoreData(HttpContext context, Int32 timeout) +59
     System.Web.SessionState.SessionStateModule.InitStateStoreItem(Boolean addToContext) +182
     System.Web.SessionState.SessionStateModule.CompleteAcquireState() +374
     System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +2007
     System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +477
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +312
  </code></pre>