TAILIEUCHUNG - ASP.NET 4 Unleased - p 133

CẢNH BÁO Không sử dụng các file cấu hình web trong Ví dụ 28,16 mà không sửa đổi các giá trị của decryptionKey cả và các thuộc tính validationKey. Những giá trị phải được bí mật. Bạn có thể sử dụng trang thảo luận trong Chương 27, "Sử dụng ASP NET thành viên.," Để tạo ra giá trị mới cho những thuộc tính này. | 1294 CHAPTER 28 Maintaining Application State WARNING Don t use the web configuration file in Listing without modifying the values of both the decryptionKey and validationKey attributes. Those values must be secret. You can use the page discussed in Chapter 27 Using ASPNET Membership to generate new values for these attributes. After you complete these configuration steps Session state information is stored in the State Server automatically. You don t need to modify any of your application code when you switch to out-of-process Session state. Configuring SQL Server Session State If you want to store Session state in the most reliable way possible you can store Session state in a Microsoft SQL Server database. Because you can set up failover SQL Server clusters Session state stored in SQL Server should survive just about anything including a major nuclear war. You must complete the following two steps to enable SQL Server Session state 1. Configure your database to support SQL Server Session state. 2. Configure your application to use SQL Server Session state. You can use the aspnet_regsql tool to add the necessary tables and stored procedures to your database to support SQL Server Session state. The aspnet_regsql tool is located in the following path WINDOWS Framework jversionj NOTE If you open the Visual Studio Command Prompt you don t need to navigate to the folder to use the aspnet_regsql tool. Executing the following command enables SQL Server Session state for a database server named YourServer. aspnet_regsql -C Data Source YourServer Integrated Security True -ssadd When you execute this command a new database is created on your database server named ASPState. The ASPState database contains all the stored procedures used by Session state. However by default Session state information is stored in the TempDB database. When your database server restarts the TempDB database is cleared .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.