我正在尝试在我的测试 Asp.Net 应用程序中使用 Azure 共享缓存会话状态提供程序,但收到以下错误
No such host is known 描述:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详细信息:System.Net.Sockets.SocketException:没有这样的主机是已知的
源错误:
在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。
堆栈跟踪:
[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主机名或地址)+109
System.ServiceModel.Channels.DnsCache.Resolve(Uri uri)+439
这是我的配置
<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>