Oct 25 2010

Duplex sample updated to Silverlight 4

I was following this thread on the Silverlight forums and was asked to update the Duplex sample to Silverlight 4.

Click here to download the code.

More information about Duplex Services are available here:

Happy Silverlighting!


May 27 2009

Silverlight 3 Beta and Binary message encoding

Silverlight 3 Beta uses Binary message encoding as a default WCF binding option, this is also the methodology used in the “Silverlight-enabled WCF Service” item template of Visual Studio.

John Papa has posted a nice article explaining the advantages of this binding instead of the “usual” BasicHttpBinding used in Silverlight 2 (other details available here and here), what about the client side? How can I use this new Binding?

These are the steps required for explicitely specifying the new binding in the code:

  • add a “Service Reference” from Visual Studio;
  • initialize and call the service in this way

EndpointAddress address = new EndpointAddress("<Your Service Uri Here>");

CustomBinding binding = new CustomBinding(
new BinaryMessageEncodingBindingElement(),
new HttpTransportBindingElement());

YourServiceRef.ServiceClient svc = new YourServiceRef.ServiceClient(binding, address);

Download the Visual Studio 2008 solution (also tested on Visual Studio 2010 Beta 1:)


Apr 27 2009

Silverlight 3 Duplex Wrap-up

I’ve already blogged about the new Silverlight 3 Beta Duplex support here. In these days I’ve found some interesting articles and tips about this topic, so this is a list of links I’ve found useful:


Mar 24 2009

Silverlight 3 Out-of-Browser Apps vs. Live Framework Mesh-Enabled Web Applications

Read this article by Kevin Hoffman.


Mar 22 2009

Silverlight 3 Beta Duplex support

I’m testing the updated Duplex support available in Silverlight 3 Beta, the important news is the possibility to simplify and reduce the code in the client:

  • now it’s possible to use the “Add Service Reference” functionality of Visual Studio to consume the service;
  • in this way you the use of channels can be avoided by simply attaching a callback to an event.

 

I’ve prepared an example based on the material available on the official documentation, download the complete solution from here.


Mar 21 2009

What’s new with web services in Silverlight 3 Beta

Great news:

  • Binary message encoding;
  • Duplex object model simplification;
  • Faults support;
  • New security mode;
  • Command-line proxy generation.

 

Check out the original post by the Silverlight Web Services Team.

Remember also to download the samples available here.

 


Mar 14 2009

Windows Communication Foundation REST Starter Kit Preview 2 available

The WCF REST Starter kit contains a set of new features that will be added to WCF 4.0 in order to simplify the development of RESTful Windows Communication Foundation Services and Clients.

This new release contains a set of new client-side features such as:

  • a new HttpClient class to send Http requests and process the Http responses;
  • a new “Paste Xml as Type“ add-in for Visual Studio to simplify the usage of the serialization capabilities offered by the new HttpClient.

 

Click here to read more information and download the installation package.


Mar 4 2009

Windows 7 How to: Login failed for user ‘IIS APPPOOL\DefaultAppPool’

If you obtain this error using WCF, IIS7, LINQ to SQL on Windows 7, read this thread:

http://www.codetoday.net/default.aspx?g=posts&t=1595


Mar 2 2009

Windows Server 2008 Web Edition – Ready for prime time

Read this great article by Bart Czernicki.


Feb 23 2009

How to speed up your app by compressing WCF service responses

Check out this excellent post by Tim Greenfield.