title: Error message 401.2.: Unauthorized: Logon failed due to server configuration. When application deployed
body: <p>I have an asp.net 4.0 application that works fine running under cassini but when i deploy to IIS i get the above error. It is running under the Default App pool which a number of other apps use and work fine. Here is a copy of my web config which may be the source:</p>
  
  
  
  <pre><code>&lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  
  &lt;configuration&gt;
    &lt;connectionStrings&gt;
      &lt;add name="FMLconnect" connectionString="Server=192.168.20.125;Port=;Database=FML;Uid=******;Pwd=*****;pooling=false;" providerName="MySql.Data.MySqlClient"  /&gt;
    &lt;/connectionStrings&gt;
  
    &lt;system.web&gt;
      &lt;httpHandlers&gt;
        &lt;add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/&gt;
        &lt;add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/&gt;
        &lt;add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/&gt;
        &lt;add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/&gt;
        &lt;add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/&gt;
        &lt;add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/&gt;
        &lt;add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/&gt;
        &lt;add type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=5.1.11.928, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" validate="true"/&gt;
      &lt;/httpHandlers&gt;
      &lt;compilation debug="true" targetFramework="4.0" &gt;
        &lt;assemblies&gt;
          &lt;add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
          &lt;!--&lt;add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
          &lt;add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;--&gt;
          &lt;add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
          &lt;add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
          &lt;add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
          &lt;add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
  
  
  
  
    &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
         &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>