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

Microsoft đã đặt một tập trung lớn vào việc nâng cao sự hội nhập giữa WF và WCF, và bản phát hành này chứng kiến sự ra đời của một loại dự án mới gọi là WF Dịch vụ (một WCF kết hợp và dịch vụ WF đại diện hoàn toàn bằng XAML). Vui lòng tham khảo Chương 6 để biết chi tiết đầy đủ. | CHAPTER 7 WINDOWS COMMUNICATION FOUNDATION HTTP Caching One of the biggest advantages to using RESTful services is that you can take advantage of HTTP caching features to improve performance and reduce load on the service. Caching wasn t too easy to implement prior to WCF4 however it is very easy in WCF4 with the simple addition of the AspNetCache profile attribute to your methods AspNetCacheProfile MyCachingProfile You then need to create a caching profile using the following configuration outputCacheSettings outputCacheProfiles add name MyCachingProfile duration 30 varyByParam format varyByHeader Accept outputCacheProfiles outputCacheSettings Misc Changes What follows are a number of other enhancements that have been introduced in WCF4. Improved Integration with WF Microsoft has put a big focus on improving the integration between WF and WCF and this release sees the introduction of a new project type called WF Service a combined WCF and WF service represented entirely in XAML . Please refer to Chapter 6 for full details. Default Performance-Related Settings Changed A number of default settings for WCF services have been tweaked for better performance MaxConcurrentSessions was 10 and is now 100 x processor count. MaxConcurrentCalls was 16 and is now 16 x processor count. MaxConcurrentInstances was 26 and is now the total of MaxConcurrentSettions and MaxConcurrentCalls. Low Memory A new minFreeMemoryToActivateService option has been added that defines the percentage of memory that needs to be free in order for a service to be activated defaulted to 5 . If less than the specified memory is available then WCF will throw an exception. 172 CHAPTER 7 WINDOWS COMMUNICATION FOUNDATION Other changes The following lists some other changes that have been made. Event Tracing for Windows is now used for tracing offering better performance. There s a new DataContractResolver class that allows control over the serialization process of types http en-us library

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
207    559    4    16-05-2024
Đã 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.