title: Lightswitch 2013 app 400 Bad request
body: <p>I deployed a LightSwitch 2013 web application to my local web server using the publishing tool in Visual Studio.  The site works great with no problems.  I am able to load records from the external SQL Server.</p>
  
  <p>When I deploy the same published package to our UAT web server there is an error statement where the data records are displayed that reads "Request failed with status code '400' and status text 'Bad Request'."  I turned on the Failed Request tracing for the application and found 2 logs. Here are the tracing logs:</p>
  
  <pre><code>Url -&gt; http://uatwebsrvr:80/LSApp/ApplicationData.svc/$metadata
  
  App Pool -&gt; LSAppPoolv4.0
  
  Authentication -&gt; anonymous
  
  User from token -&gt; NT AUTHORITY\IUSR 
  
  Activity ID -&gt; {00000000-0000-0000-D000-0080000000EE} 
  
  Site -&gt; 1
  
  Process -&gt; 3448
  
  Failure Reason -&gt; STATUS_CODE 
  
  Trigger Status -&gt; 400 
  
  Final Status -&gt; 400 
  
  Time Taken -&gt; 0 msec
  </code></pre>
  
  <p>The second log is identical to this log with the exception of the service being used.  </p>
  
  <p>I compared the IIS configs on the UAT server and my Dev server.  The only differences that I could find are some missing assemblies on the UAT server.  But I don't really think this is the issue.  The missing assemblies are these 3:  </p>
  
  <pre><code>*Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  System.Web.WebPages.Deployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
  System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35*
  </code></pre>
  
  <p>The application pools have identical configurations.  </p>
  
  <p>One other thing.  I created a very basic Lightswitch application to display some database records to test the database connection.  I deployed this to the UAT web server and this application works perfectly.  This app uses the same database as my real app.</p>