title: .NET Web Service logging with Log4Net not working from separate client
body: <p>In a basic .NET web service (asmx) which I am building locally, I'm trying to log using Log4NET to a file.  This works fine if I fire up debugging mode in Visual Studio and test the service using the wsdl/test pages provided.  But if I try using a separate client (I made a C# console app to call the service), I see the expected response, but get NO logging.<br>
  (The separate client code is listed below.  I had to import a reference to the built DLL of the web service.)</p>
  
  <p>I'm a bit new to this, but I speculate the issue is because outside of the VS server or IIS (which I am stuck without), Global.asax is not used (which contains my initialization command for logging).  But I need to test from an external client.  How can I get Global.asax to initialize from the client application perspective, or how can I avoid needing to?  Does this sound like it would solve my logging issue? </p>
  
  <p>Global.asax in my web service project contains this statement:</p>
  
  <pre><code>protected void Application_Start(object sender, EventArgs e)
  {
      log4net.Config.XmlConfigurator.Configure();
  }
  </code></pre>
  
  <p>And my separate client (console) application looks like this:</p>
  
  <pre><code>static void Main(string[] args)
  {
      MyWebService proxy = new MyWebService();
  
      MyWebService.Request request = new MyWebService.Request();
      request.Type = "Test";
  
      MyWebService.Response response = proxy.GetResponse(request);
  
      Console.WriteLine("RESPONSE CODE: " + response.StatusCode);
      Console.WriteLine("RESPONSE MSG: " + response.StatusMessage);
      Console.WriteLine("Press any key to continue...");
      Console.ReadKey(true);
  }
  </code></pre>
  
  <p>I'm also unclear how I would change this console app to reference the Visual Studio server instance (ex: localhost:1583/MyWebService.asmx?op=GetResponse) instead of creating a proxy instance of the web service.  I think that would also do the trick, since the Visual Studio server utilizes Global.asax, no?</p>