locked
Javascript, jQuery, Json works on localhost but not on hosting server RRS feed

  • Question

  • User-94285869 posted

    Hi,

    I deployed our web app using Web Deploy in Visual Studio 2015 to our production server.  However, my JavaScript/jQuery and JSON functions are not firing in the production server.  They work perfectly on my developing machine.

    Our server is running Windows 2008 Server R2, IIS 7.x, and .NETFramework 4.6.1.  My Web App is using ASP.NET MVC 5 and Entity Framework 6 (SQL Server 2014 back end database).

    Does anyone know what's causing this?

    Appreciate your help.

    Thursday, September 29, 2016 1:54 AM

Answers

  • User-654786183 posted

    You can use IE Developer Tools (Network tab) or Fiddler to make sure they jQuery and other JavaScript files are getting downloaded properly in the browser.  If there is 404 error on the jQuery/JavaScript files, make sure the files are present in the production server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 29, 2016 2:58 AM

All replies

  • User-654786183 posted

    You can use IE Developer Tools (Network tab) or Fiddler to make sure they jQuery and other JavaScript files are getting downloaded properly in the browser.  If there is 404 error on the jQuery/JavaScript files, make sure the files are present in the production server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 29, 2016 2:58 AM
  • User-2057865890 posted

    Hi Mgambone,

    Open the Publish Web wizard make sure that the Production publish profile is selected, and then click Start Preview on the Preview tab to verify that the js file will be copied to the production app.

    Best Regards,

    Chris

    Thursday, September 29, 2016 11:09 AM
  • User-94285869 posted

    Hi,

    Did this.  All files are being copied to the server except the Controller folder and its contents.  I had to manually copy this to the production server.  Also when I re-publish, the Controller files are also not being updated.  Just curious what's going on with this.  This would be another topic, I guess.  Right now, I'm manually looking at the production server and checking to make sure Controller files are transferred over.

    Thursday, September 29, 2016 1:42 PM
  • User-94285869 posted

    Hi,

    Checked this our.  Turns out, I didn't reference a library I'm using, jquery.json.js.  Included it and it's now working.  Thanks.

    Thursday, September 29, 2016 1:43 PM