title: ASP.Net Webservice 500 - Internal server error
body: <p>I have created a webservice and i have hosted in IIS7 in my local machine and it works without any problem and canbe used within the LAN.
  Then i hosted it in a paid Microsoft webserver, but once i open .asmx or anyother page on browser it gives following error message </p>
  
  <p>500 - Internal server error.
  There is a problem with the resource you are looking for, and it cannot be displayed.</p>
  
  <p>My web.config is displayed below.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!-- 
      Note: As an alternative to hand editing this file you can use the 
      web admin tool to configure settings for your application. Use
      the Website-&gt;Asp.Net Configuration option in Visual Studio.
      A full list of settings and comments can be found in 
      machine.config.comments usually located in 
      \Windows\Microsoft.Net\Framework\v2.x\Config 
  --&gt;
  &lt;configuration&gt;
      &lt;appSettings&gt;
      &lt;/appSettings&gt;
      &lt;connectionStrings/&gt;
      &lt;system.web&gt;
          &lt;!-- 
              Set compilation debug="true" to insert debugging 
              symbols into the compiled page. Because this 
              affects performance, set this value to true only 
              during development.
          --&gt;
          &lt;compilation debug="true" targetFramework="4.0"&gt;
          &lt;/compilation&gt;
          &lt;!--
              The &lt;authentication&gt; section enables configuration 
              of the security authentication mode used by 
              ASP.NET to identify an incoming user. 
          --&gt;
          &lt;authentication mode="Windows"/&gt;
          &lt;!--
              The &lt;customErrors&gt; section enables configuration 
              of what to do if/when an unhandled error occurs 
              during the execution of a request. Specifically, 
              it enables developers to configure html error pages 
              to be displayed in place of a error stack trace.
  
          &lt;customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"&gt;
              &lt;error statusCode="403" redirect="NoAccess.htm" /&gt;
              &lt;error statusCode="404" redirect="FileNotFound.htm" /&gt;
          &lt;/customErrors&gt;
          --&gt;
          &lt;pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/&gt;&lt;/system.web&gt;
      &lt;!-- 
          The system.webServer section is required for running ASP.NET AJAX under Internet
          Information Services 7.0.  It is not necessary for previous version of IIS.
      --&gt;
  &lt;/configuration&gt;
  </code></pre>