This page is about the Microsoft.Net.Http package. Our first release announcement can be found here.
When using HttpClient from a Silverlight application many http headers are not supported and will result in an ArgumentException or NotImplementedException when set and calling HttpClient methods that send a request.
For a list of headers which are not supported in Silverlight please see: http://msdn.microsoft.com/en-us/library/system.net.webheadercollection(v=vs.95).aspxhttp://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.headers(v=vs.95).aspx
When HttpClientHandler.SupportsProtocolVersion() is false the HttpResponseMessage returned from a request will have a null value for Version.
Make sure that anytime you are using a version from the HttpResponseMessage, you do a null check on it if SupportsProtocolVersion() is false.
When using HttpClient on Silverlight or the Phone be aware that the networking stack may cache responses.
To avoid inconsistencies when creating portable class library that runs on both platforms be sure that your server sets the cache control-header on the response to match your expected caching behavior on the Phone. If you do not control the server, consider making a portion of the request unique if you do not want a cached result.
ClickOnce applications targeting .NET Framework 4.0 that reference the Microsoft.Net.Http package may experience a TypeLoadException or other errors after being installed.
This occurs because ClickOnce fails to deploy certain required assemblies. As a workaround, do the following: