Export (0) Print
Expand All

ByteStream Encoder

This sample demonstrates how to create a ByteStreamHttpBinding, a Binding that demonstrates the functionality of the byte stream encoder.

This sample demonstrates how to create a standard Binding using the standard binding elements ByteStreamMessageEncodingBindingElement and HttpTransportBindingElement. This sample shows how to use the byte stream encoder to upload and download an image. The byte stream encoder feature only supports the HTTP transport and it does not support features such as reliable messaging or security. The only MessageVersion supported is None.

Important note Important

If you are running this sample in Windows Vista or Windows°7 operating system, ensure that you are running Visual Studio 2012 with elevated privileges.

Important note Important

The samples may already be installed on your machine. Check for the following (default) directory before continuing.

<InstallDrive>:\WF_WCF_Samples

If this directory does not exist, go to Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4 to download all Windows Communication Foundation (WCF) and WF samples. This sample is located in the following directory.

<InstallDrive>:\WF_WCF_Samples\WF\Basic\Binding\ByteStreamEncoder

To set up, build, and run the sample

  1. Open the ByteStreamHttpBinding.sln file in Visual Studio 2012.

  2. Start a new instance of the ByteStreamHttpBindingServer project by right-clicking the project in the Solution Explorer and selecting Debug, and then Start new instance from the context menu.

  3. Start a new instance of the ByteStreamHttpBindingClient project by right-clicking the project in the Solution Explorer and selecting Debug, Start new instance from the context menu.

Show:
© 2014 Microsoft