0
votes

I am trying to use Azure Shared Caching Session State Provider in My Test Asp.Net Application but receiving following error

No such host is known 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.Sockets.SocketException: No such host is known

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:

[SocketException (0x2af9): No such host is known]
System.Net.Dns.GetAddrInfo(String name) +6603642
System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) +106 System.Net.Dns.GetHostEntry(String hostNameOrAddress) +109
System.ServiceModel.Channels.DnsCache.Resolve(Uri uri) +439

Here is my config

<sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider" compressionEnabled="false">
      <providers>
        <add name="AppFabricCacheSessionStoreProvider"
             type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache"
             cacheName="default"
             useBlobMode="true"
             dataCacheClientName="default"/>
      </providers>
    </sessionState>

<dataCacheClients>
    <dataCacheClient name="default">
      <hosts>
        <host name="http://dummyPart-cache.accesscontrol.windows.net" cachePort="22233" />
      </hosts>
      <securityProperties mode="Message">
        <messageSecurity authorizationInfo="dummykey"></messageSecurity>
      </securityProperties>
    </dataCacheClient>
    <dataCacheClient name="SslEndpoint">
      <hosts>
        <host name="https://dummyPart-cache.accesscontrol.windows.net" cachePort="22243" />
      </hosts>
      <securityProperties mode="Message" sslEnabled="true">
        <messageSecurity authorizationInfo="dummykey"></messageSecurity>
      </securityProperties>
    </dataCacheClient>
  </dataCacheClients>
1

1 Answers

0
votes

Got it, was using http:// in host name.

<host name="https://dummyPart-cache.accesscontrol.windows.net" cachePort="22243" />

it should be

<host name="dummyPart-cache.accesscontrol.windows.net" cachePort="22243" />