Request failed with status code '400' and status text 'Bad Request' using IIS. RRS feed

  • Question

  • Here is the background. I deployed a LightSwitch 2013 web applicaiton to my local webserver 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. However when I deploy the exact same published package to our UAT web server I am having an issue. 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:

    *Url -> http://uatwebsrvr:80/LSApp/ApplicationData.svc/$metadata

    App Pool -> LSAppPoolv4.0

    Authentication -> anonymous

    User from token -> NT AUTHORITY\IUSR

    Activity ID -> {00000000-0000-0000-D000-0080000000EE}

    Site -> 1

    Process -> 3448

    Failure Reason -> STATUS_CODE

    Trigger Status -> 400

    Final Status -> 400

    Time Taken -> 0 msec*

    The second log is identical to this log with the exception of the service being used.

    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: 

    Microsoft.VisualStudio.Web.PageInspector.Loader, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Web.WebPages.Deployment, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35 System.Web.WebPages.Deployment, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35

    The application pools have identical configurations.

    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 webserver and this application works perfectly. This app uses the same database as my real app.

    Any help would be really appreciated. I am at a loss as to what the problem is. Thanks!

    Tuesday, August 11, 2015 8:19 PM


  • This issue has been resolved.  The resolution is to change all the references on the server project to "Copy Local"
    • Proposed as answer by ADefwebserver Friday, August 14, 2015 7:30 PM
    • Marked as answer by mountainDev Friday, August 14, 2015 7:34 PM
    Friday, August 14, 2015 6:47 PM

All replies