title: HTTP Error 503. The service is unavailable. App pool stops on accessing website
body: <p>There are number of posts on this and I have tried many a things by now. But to no avail. Myself a Winforms Developer basically, started working on this Web stuff few days back as my company is taking Web initiatives.</p>
  
  <p>I have a ASP.Net project and I want to host it on local IIS. In <code>Project properties -&gt; Web</code> settings I chose <code>Use Local IIS Server</code> and gave a url as <code>localhost/MyApp</code>. I tried accessing it on my firefox browser and received error as <code>HTTP Error 503. The service is unavailable.</code></p>
  
  <p>Previously I got many other errors and I one by one fixed them all. But struck with this one. These are the settings I have in my project</p>
  
  <ol>
  <li>Application Pool set to ASP.Net v4.0 Classic</li>
  <li>App Pool <code>Enable 32 bit Application</code> property is true</li>
  <li>App Pool is started</li>
  <li>Project build property set to <code>Any CPU</code> for Target framework</li>
  </ol>
  
  <p>But I would like to mention a weird behavior. Following is something that I am facing</p>
  
  <ol>
  <li>Application Pool is Started</li>
  <li>I try to access my local website (by giving url as <code>localhost/MyApp</code>)</li>
  <li>I receive the error as <code>HTTP Error 503. The service is unavailable</code></li>
  <li>Application Pool is Stopped</li>
  </ol>
  
  <p>I have seen <a href="https://stackoverflow.com/questions/13322937/iis-http-error-503-the-service-is-unavailable">following link</a> and I have already tried it. For the above behavior I reached <a href="http://forums.iis.net/t/1183845.aspx" rel="noreferrer">here</a>. According to this link, Computer name should not have <code>.</code> in it. I don't have any <code>.</code> in my Computer name but do have <code>-</code> in it. Also my domain name contains <code>.</code> in it. Moreover I can't change these settings as its my office laptop and our TFS settings are bound to our Domain and Computer Names.</p>
  
  <p>Can anyone help me to understand whats happening? Please guide me. Thanks.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I have following code in <code>Global.asax</code>. <code>Application_BeginRequest</code> method is empty in same file.</p>
  
  <pre><code>protected override void Application_Start(object sender, EventArgs e)
  {
      base.Application_Start(sender, e);
      String _path = String.Concat(System.AppDomain.CurrentDomain.RelativeSearchPath, ";",
                                           System.Environment.GetEnvironmentVariable("PATH"));
      System.Environment.SetEnvironmentVariable("PATH", _path, EnvironmentVariableTarget.Process);
      MyAppLog.Initialize();
      MyAppLog.WriteMessage("Application Started");
  }
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>As per the suggestions in Comment, I am able to run the website from Cassini.</p>