2010-10-08 22 views
9

Tôi đã cài đặt AppFabric trên máy chủ. Tôi đã tạo ra một cụm của một máy tính duy nhất. Tôi cũng tạo bộ nhớ cache có tên "Gagan". sử dụng các lệnh sau theo thứ tựAppFabric ErrorCode <ERRCA0017><ES0006>:

Sử dụng-CacheCluster -Provider xml -ConnectionString \ NB-GJANJUA \ Cache Start-CacheCluster

Kết quả là các dịch vụ cache khởi động và chạy ..so đến nay rất tốt.

tôi sau đó cài đặt file web.config của tôi như dưới đây

<?xml version="1.0"?> 
<configuration> 
    <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> 

<!-- cache client --> 
<dataCacheClient> 
<!-- cache host(s) --> 

<hosts> 
    <host 
    name="NB-GJANJUA.com" 
    cachePort="22233"/> 
</hosts> 
</dataCacheClient> 

<system.web>  

<compilation debug="true" targetFramework="4.0" > 
    <assemblies> 
     <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
     <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
     <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
     <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
     <add assembly="Microsoft.ApplicationServer.Caching.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
     <add assembly="Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
    </assemblies> 
</compilation> 

<sessionState mode="Custom" customProvider="SessionStore" cookieless="true"> 
    <providers> 
    <add name="SessionStore" type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider" cacheName="Gagan" /> 
    </providers> 
</sessionState> 
</system.web> 

<system.webServer> 
<modules runAllManagedModulesForAllRequests="true"/> 
</system.webServer> 
</configuration> 

Nhưng ngay sau khi tôi khởi động trang web của tôi, nó đi kèm với lỗi này

Parser Error Message: ERRORCODE: SubStatus: Có một sự thất bại tạm thời. Vui lòng thử lại sau. (Một hoặc nhiều máy chủ Cache được chỉ định không khả dụng, có thể do mạng hoặc máy chủ bận gây ra. Đảm bảo rằng quyền bảo mật đã được cấp cho tài khoản khách hàng này trên cụm và Dịch vụ lưu trữ AppFabric được cho phép thông qua tường lửa trên tất cả các máy chủ lưu trữ bộ nhớ cache. thử lại sau) Lỗi

Nguồn:.

Line 44:  <sessionState mode="Custom" customProvider="SessionStore" cookieless="true"> 
Line 45:  <providers> 
Line 46:   <add name="SessionStore" type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider" cacheName="Gagan" /> 
Line 47:  </providers> 
Line 48:  </sessionState> 

có một cái gì đó mà tôi đang thiếu?

Lưu ý: Tôi đã tham khảo các Microsoft.ApplicationServer.Caching.Client và hội Microsoft.APplicationServer.Caching.Core

Cảm ơn thời gian và sự kiên nhẫn của bạn

Với mừng Gagan Janjua

+1

Tôi thực sự không biết lý do tại sao toàn bộ cấu hình .xml không được hiển thị ở đây – Gagan

+1

< mô-đun chạyAllManagedModulesForAllRequests = "true" /> Gagan

Trả lời

2

Bạn có cấp quyền truy cập vào bộ nhớ cache cho bất kỳ người dùng nào mà trang web của bạn đang chạy không?

Grant-CacheAllowedClientAccount Gagan

+4

Tôi đã vô hiệu hóa bảo mật ở cấp máy chủ và ở cấp độ khách hàng – Gagan

4

Tôi gặp sự cố tương tự, đang chạy IIS 7.5 trên Windows Server 2008 R2. Tôi giải quyết nó bằng cách phát hành các lệnh sau trong PowerShell (bắt đầu từ thư mục Windows AppFabric trong Start, All Programs):

New-Cache -CacheName NameOfCacheAsSetInWebConfig -TimeToLive 30
Grant-CacheAllowedClientAccount "IIS AppPool \ NameOfAppPoolRunningSite"

Một khi tôi đã làm điều đó, tôi đã được tất cả các thiết lập.

1

Tôi gặp sự cố này và chỉ là Cache Cluster đã ngừng hoạt động sau khi khởi động lại. Tôi đã không nhận ra rằng bạn phải tự chuyển dịch vụ để bắt đầu tự động trong các dịch vụ. Thông tin chi tiết về điều đó là here.

2

tôi giải quyết vấn đề này như sau:

Launch Windows Task manager và thông báo theo những gì user name w3wp.exe của bạn đang chạy?

Trong trường hợp của tôi, đó là: ASP.NET v4.0

Ra mắt Start -> All Programs -> Windows Server App Vải -> IIS manager

Trong IIS, chọn tên máy và sau đó Hồ bơi ứng dụng trên handside trên bên trái.

Trong các hồ bơi ứng dụng ..Xác minh rằng ASP.net v4.0 tồn tại trong Hồ bơi ứng dụng.

Ra mắt Start -> All Programs -> Windows Server App Vải -> Caching Quản trị Windows Power Shell

Gõ lệnh sau vào dấu nhắc: Grant-CacheAllowedClientAccount "ASP.NET v4.0"

khởi động lại ứng dụng web và báo lỗi sau ra đi:

ErrorCode<ERRCA0017>:SubStatus<ES0006>: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. Ensure that security permission has been granted for this client account on the cluster and that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Retry later.) 
8

tôi cũng đã có lỗi này. Chỉ cần để kiểm tra khách hàng trong việc phát triển Tôi tắt bảo mật bằng cách sử dụng AppFabric Power Shell lệnh

Stop-CacheCluster 
    Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None 
    Start-CacheCluster 

Ngoài ra thiết lập sau đây trong ứng dụng client trong web.config

<dataCacheClient> 
    <securityProperties mode="None" protectionLevel="None"/> 
    </dataCacheClient> 

Đây không phải là kịch bản sản xuất nhưng lỗi trên biến mất khi các cài đặt này được áp dụng.

1

Bình luận ra sau trong cấu hình cố định nó cho tôi:

<sessionState customProvider="AppFabricCacheSessionStoreProvider" mode="Custom" timeout="90"> 
    <providers> 
    <add name="AppFabricCacheSessionStoreProvider" type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider" cacheName="Session" sharedId="SharedApp" /> 
    </providers> 
</sessionState> 
+0

Điều này có hiệu quả khi tắt u hiền triết của AppFabric, FYI. – Brady

0

Theo mặc định các quá trình lao động sẽ được thiết lập như một người sử dụng IIS, những người dùng cần truy cập. Trong Administration Caching Windows Powershell loại của bạn sau

Grant-CacheAllowedClientAccount IIS_IUSRS

Các vấn đề liên quan