Lập trình .net 4.0 và visual studio 2010 part 64

LocalStorage là một khu vực mà bạn có thể tạm thời lưu các tập tin và nó có thể hữu ích cho bộ nhớ đệm, tải lên, và serialization. Cảnh báo, bạn không nên tiết kiệm bất cứ điều gì ở đây bạn muốn giữ kể từ khi lưu trữ địa phương sẽ bị xóa nếu bạn khởi động lại ứng dụng | CHAPTER 16 WINDOWS AZURE Local Storage LocalStorage is an area to which you can temporarily save files and it can be useful for caching uploading and serialization. Warning you should not save anything here you want to keep since local storage will be cleared if your application restarts. To use LocalStorage simply add a new entry to to define the storage area LocalStorage name MyStorage Once you have defined the storage you can now use the method to return a LocalResource object that allows you to utilize the file. The following example shows how to save a file to local storage LocalResource resource MyStorage string Path string FileContents Hello Azure Path FileContents If you want to see items that have been saved in the development fabric s local storage with the previous code then you can right-click on the web role and select Open local storage option and browse to Directory MyStorage. Worker Roles A worker role is Azure s version of a Windows service. Worker roles are used for continual or long-running tasks such as processing data held in an Azure queue we will look at Azure queues shortly . Worker roles cannot be accessed directly like a web role or page but they do allow the creation of HTTP-based endpoints for inter-role communication. Please see the Azure samples November training kit http downloads FamilyID 413e88f8-5966-4a83-b309-53b7b77edf78 displaylang en which contains a thumbnail image generator example. In many Azure projects you will want to use both web and worker roles. To add a web or worker role to an existing project just right-click on the Roles directory and then select to add a new worker role. You may remember you also had the option to add a role when creating a project. Let s take a quick look at worker roles. 1. Right-click on the Roles directory .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.