ASP.NET WebForms OAuth2 multi-tenant resource and WPF client

Most published WebAPI samples (e.g. http://msdn.microsoft.com/en-us/library/azure/dn646737.aspx) are based on the MVC and OWin infrastructure, which is not available in WebForms applications. Following is a custom implementation of an OAuth2 access token handler presented by a WPF rich client application. The WPF is responsible for managing the OAuth code grant flow to obtain the token and present […]

Silverlight and basic authentication

Silverlight client does not support TransportCredentialOnly to enable Basic authentication. Here is some code to add the basic authentication http header to a standard Silverlight WCF proxy:                 ServiceReference1.ServiceClient svc = new ServiceReference1.ServiceClient(); // binding, new EndpointAddress(“any.txt://deadend.com”));            svc.GetDataUsingDataContractCompleted += (s, a) =>      […]