tailieunhanh - Introducing Windows Azure- P38

Introducing Windows Azure- P38: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 http wsfed authorization 200706 claims action claimValue if claimSet return throw new FaultException Access denied. static bool IsIssuedByIbn ClaimSet claimSet foreach Claim claim in if http ws 2005 05 identity claims dns return true return false static bool CheckClaim string claimType string claimValue string expectedClaimType string expectedClaimValue if claimType expectedClaimType claimValue expectedClaimValue return true return false Now let s modify the WCF service operation implementation. For all implementations of the operation in the WCF service contract we need to insert the code to demand the claim for the security token by using the previous helper class as Listing 5-18 shows. 163 CHAPTER 5 AZURE .NET SERVICES ACCESS CONTROL Listing5-18. Implementation of the WCFService Contract using System using using using using using using using using namespace ServiceBehavior InstanceContextMode public class AzureForDotNetDeveloperWCFservice IAzureForDotNetDeveloperWCFservice private User registeredUser null region IUserRegisterService Members public string Ping return I am here 0 public void RegisterUser string xmlString try XmlDocument xmlDoc new XmlDocument xmlString XmlSerializer serializer new XmlSerializer typeof User StringReader .