title: How to unit test C# Web Service with Visual Studio 2008
body: <p>How are you supposed to unit test a web service in C# with Visual Studio 2008?  When I generate a unit test it adds an actual reference to the web service class instead of a web reference.  It sets the attributes specified in:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/ms243399(VS.80).aspx#TestingWebServiceLocally" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms243399(VS.80).aspx#TestingWebServiceLocally</a></p>
  
  <p>Yet, it will complete without executing the test.  I attempted to add the call to <code>WebServiceHelper.TryUrlRedirection(...)</code> but the call does not like the target since it inherits from <code>WebService</code>, not <code>WebClientProtocol</code>.</p>