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.
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.
The samples may already be installed on your machine. Check for the following (default) directory before continuing.
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.
To set up, build, and run the sample
Open the ByteStreamHttpBinding.sln file in Visual Studio 2012.
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.
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.