Đang chuẩn bị liên kết để tải về tài liệu:
Introducing Windows Azure- P35

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Introducing Windows Azure- P35:The cloud platform is getting more and more attractive to the computing world. Today, service-oriented architecture (SOA) and aspect-oriented programming (AOP) techniques are widely used in enterprise solutions. A question an IT management team or a software development team may ask is, what is the next trend going to be? Cloud computing seems to be the right answer. | CHAPTER 5 AZURE .NET SERVICES ACCESS CONTROL private User registeredUser null region lUserRegisterService Members public string Ping return string.Format I am here 0 this.ToString public void RegisterUser string xmlString try XmlDocument xmlDoc new XmlDocument xmlDoc.LoadXml xmlString XmlSerializer serializer new XmlSerializer typeof User StringReader reader new StringReader xmlString registeredUser User serializer.Deserialize reader catch Exception ex public string GetRegisteredUser XmlSerializer serializer new XmlSerializer typeof User StringBuilder sb new StringBuilder StringWriter writer new StringWriter sb serializer.Serialize writer registeredUser return writer.GetStringBuilder .ToString endregion Service Implementations and Configurations The following is the implementation of the server Listing 5-9 and its configuration Listing 5-10 . Listing 5-9. Implementations for Service Host using System using System.Security.Cryptography.X509Certificates using System.ServiceModel using System.ServiceModel.Description 143 CHAPTER 5 AZURE .NET SERVICES ACCESS CONTROL namespace AzureForDotNetDeveloper.DotNetService.ServiceBus class Program static void Main string args ServiceHost host new ServiceHost typeof AzureForDotNetDeveloperWCFservice host.Open Console.WriteLine UserRegister service is running. Console.WriteLine Press Enter to terminate server Console.ReadLine host.Close private static string ReadSolutionName Console.Write string.Format Please enter your solution name 0 Environment.NewLine return Console.ReadLine Listing 5-10. Configurations for Service Host xml version 1.0 encoding utf-8 configuration system.serviceModel bindings basicHttpBinding binding name basicHttpBinding1 basicHttpBinding bindings services service behaviorConfiguration UserRegisterServiceBehavior name AzureForDotNetDeveloper.DotNetService.ServiceBus .AzureForDotNetDeveloperWCFservice endpoint address binding basicHttpBinding bindingConfiguration name UserRegisterEndpoint contract .