What Was I Thinking?

Follies & Foils of .NET Development

  Home  |   Contact  |   Syndication    |   Login
  74 Posts | 0 Stories | 191 Comments | 0 Trackbacks

News

Archives

Post Categories

Check These Out

Gurus

WCF

I've got a solution to running and debugging unit tests for WCF hosted services that utilize the CMServiceHost. Whether your generate your serivce proxy via WSDL (Add Service Reference) or Shared Contract (ClientFactory), the solution is similar. This email will detail how to invoke a WCF Service Host for testing in both scenarios. Testing a service client generated via "Add Service Reference" I'll illustrate the solution using the following sample unit test. Let's assume you've created a service...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

I recently needed to adjust the timeout value of the HTTP Request being generated by WebClient. My attempt to perform a POST of a large file over HTTP was causing the WebClient to timeout. I thought adjusting the timeout value for the web client would fix this problem. One problem, the WebClient doesn’t support a Timeout value. I did some snooping via Reflector and discovered 2 important facts about the WebClient. Fact #1, The WebClient isn’t sealed. This means we can inherit from it. Fact #2: The...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

I recently encountered this error when I attempted to consume a new hosted WCF service. The service used the Request/Response model and had been properly decorated. The response and request objects were marked as DataContracts and had a specified namespace. My WCF service interface was marked as a ServiceContract and shared the namespace attribute value. Everything should have been fine, right? [ServiceContract(Namespace = "http://schemas.myclient.co... public interface IProductActivationService...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati