Browse by Tags
All Tags »
Web Services »
WCF (
RSS)
This post was long due, so here it is. Prepare for a long post! Whenever you need to consume a WCF web service from a web page, you have (at least) three options: Have the ASP.NET ScriptManager generate a strongly-typed JavaScript proxy to the service...
You probably know that to have cookie-based sessions in your WCF service, you have to use one of the *ContextBinding bindings, such as BasicHttpContextBinding . But what if you want to share cookies (such as authentication) among different services? Enter...
(UPDATED) As of version 3.5 SP1, .NET comes along with the following serializers: System.Runtime.Serialization.Formatters.Binary.BinaryFormatte r : binary serializer used in .NET Remoting, type information is included, understands System.Runtime.Serialization...
Updated: thanks to Nobody for the remark! Suppose you want to transmit a list of items where possibly some of them refer to other items on the list. For example: [DataContract] public class MenuItem { [DataMember] public String Text { get; set; } [DataMember...
Suppose you want to transmit large binary contents (a file, for example) through WCF. In the usual way, you would use a classe decorated with a [DataContract] attribute, and you would have inside of it a property of type Byte[] , marked with a [DataMember...
I am normally against having an interface inherit from another one, but there's a situation where I am in favor of it: web service interfaces! The reason is that we can write code like this: using ( ChannelFactory < IMyService > factory = new ChannelFactory...
WCF was designed to be fully extensible, at all levels. If I want to pass a custom identity (an application-defined username and role and the desired culture) to a WCF web service (not using ASP.NET compatibility mode), this is what I do: I defined a...
In order to enable validation of the properties of a request message, you only need to add a [ValidationBehavior] attribute to your service interface, just next (or before) the [ServiceContract ], and a [FaultContract(typeof(ValidationFault ))] on the...
Version 2.03 of the .NET StockTrader sample application was released. Key features are: The new download includes the automated setup for the .NET StockTrader 2.03 and the Configuration Service 2.03, with associated technical documents that explain how...
More Posts