2010-05-13 8 views
7

Estoy intentando poner en funcionamiento el caché de AppFabric en mi entorno de desarrollo local. Tengo Windows Server AppFabric Beta 2 Refresh instalado, y el clúster de caché y el host configurados y comenzaron a ejecutarse en Windows 7 de 64 bits. Estoy ejecutando mi sitio web MVC2 en un sitio web IIS local en un grupo de aplicaciones v4.0 en modo integrado.Caché de AppFabric: el host remoto cerró por la fuerza una conexión existente

HostName : CachePort  Service Name   Service Status Version Info 
--------------------  ------------   -------------- ------------ 
SN-3TQHQL1:22233   AppFabricCachingService UP    1 [1,1][1,1] 

tengo mi web.config configurado con lo siguiente:

<configSections> 
     <section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere"/> 
    </configSections> 

    <dataCacheClient> 
     <hosts> 
      <host name="SN-3TQHQL1" cachePort="22233" /> 
     </hosts> 
    </dataCacheClient> 

Recibo un error cuando intento inicializar el DataCacheFactory:

protected CacheService() 
    { 
     _cacheFactory = new DataCacheFactory(); <-- Error here 
     _defaultCache = _cacheFactory.GetDefaultCache(); 
    } 

estoy recibiendo la pantalla de error amarilla ASP.NET con lo siguiente:

An exi el host remoto cerró por la fuerza la conexión de picadura

Descripción: Se produjo una excepción no controlada durante la ejecución de la solicitud web actual. Revise el seguimiento de la pila para obtener más información sobre el error y dónde se originó en el código.

Detalles de la excepción: System.Net.Sockets.SocketException: Una conexión existente forzosamente fue cerrada por el host remoto

Error de origen:

Line 21:   protected CacheService() 
Line 22:   { 
Line 23:    _cacheFactory = new DataCacheFactory(); 
Line 24:    _defaultCache = _cacheFactory.GetDefaultCache(); 
Line 25:   } 
+0

la verdadera pregunta es si su cuenta no tenía acceso, ¿por qué no variaba el servidor le dirá que ins Tead de "Una conexión existente fue cerrada a la fuerza por el host remoto" – felickz

Respuesta

14

Tuve un problema similar también, y mi problema era que no le había dado los permisos adecuados al cliente de caché. Para verificar rápidamente que este es el problema, le otorgaría a todos acceso a la caché. Si esto soluciona el problema, considere limitar el acceso a la cuenta adecuada en lugar de a todos. Esto puede hacerse ejecutando el siguiente comando a través de la "Almacenamiento en caché de administrador de Windows PowerShell", que se encuentra en el servidor de AppFabric de Windows iniciar carpeta del menú:

Grant-CacheAllowedClientAccount everyone 
+0

¡Gracias! Estuve tratando de resolver esto por un tiempo, eres un salvavidas. –

+1

Esta es una forma perezosa de hacerlo. Una solución más precisa es: Grant-CacheAllowedClientAccount "IIS AppPool \ AppPoolOfYourApplicationAccessingTheCache" –

1

se obtiene el mismo problema si se utiliza un DataCacheFactoryConfiguration ¿objeto? p.ej.

protected CacheService() 
{ 
    DataCacheFactoryConfiguration config; 
    List<DataCacheServerEndpoint> endpoints; 
    DataCacheFactory factory; 
    DataCache cache; 

    endpoints = new List<DataCacheServerEndpoint>(); 
    endpoints.Add(new DataCacheServerEndpoint("SN-3TQHQL1",22233)); 

    config = new DataCacheFactoryConfiguration(); 
    config.Servers = endpoints; 

    factory = new DataCacheFactory(config); 

    cache = factory.GetDefaultCache(); 
    ... 
} 

¿Ha abierto el puerto de su firewall?

Tal vez verifique las entradas en los registros de eventos, ya que pueden ofrecer pistas sobre lo que está sucediendo (o no).

+0

Sí, lo he intentado también. He recorrido todas las configuraciones tanto como pude y todo parece estar configurado correctamente. +1 –

+0

@Wallace No estoy seguro, entonces. Intente volver a instalar tal vez? – PhilPursglove

+0

La reinstalación tampoco funcionó. Actualmente estoy en contacto con Microsoft para intentar resolver este problema.Voy a publicar una respuesta una vez que reciba noticias de ellos. –

2

tuve este problema también y he encontrado la respuesta en este hilo:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/c27063e7-1579-4d62-9104-87076d1c8d98/client-caching-error-errorcodeerrca0017substatuses0006

la respuesta:

You are seeing this error because of the security property mismatch between client and server.

In your client code you disabled the security (Mode=None and PotectionLevel=None) whereas the cache server uses mode=Transport and PotectionLevel=EncryptAndSign (default in Beta2Fresh bits).

Do either of the following:

1) In the client code use the default security i.e. configuration.SecurityProperties =new DataCacheSecurity();

2) Disable the security at server to match with your existing client code. Use Powershell cmdlet Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None

+0

Esto funcionó para mí. ¡Muchas gracias por el tiempo que me salvaste! –

Cuestiones relacionadas