title: 500 error for long url iis7
body: <p>I was getting 404 errors for some long URLs on a website I'm developing. After a bit of digging I discovered that this occurs when the length of certain aspects of the URL exceed configurable limits in IIS7. In this case the <em>maxQueryString</em> attribute of the <em>requestLimits</em> property needed to be increased in the web.config</p>
  
  <pre><code>&lt;system.webServer&gt;
  &lt;security&gt;
    &lt;requestFiltering&gt;
      &lt;requestLimits maxQueryString="4096" maxAllowedContentLength="4096" maxUrl="8192" &gt;
      &lt;/requestLimits&gt;
    &lt;/requestFiltering&gt;
  &lt;/security&gt;
  </code></pre>
  
  <p></p>
  
  <p>This fixed the problem instantly on my development server but on the remote server I now get:</p>
  
  <blockquote>
    <p>500 - Internal server error. </p>
    
    <p>There is
    a problem with the resource you are
    looking for, and it cannot be
    displayed.</p>
  </blockquote>
  
  <p>And that's all the information it gives me. </p>