What could be causing the updated JavaScript file to not run on a live Azure website using ASP.NET MVC?

After making a minor adjustment to my JavaScript file on my deployed ASP MVC website hosted on Azure, I decided to redeploy everything. However, upon checking the resource files, I noticed that the JavaScript had indeed been changed, but the behavior of the website remained unchanged. What could be causing this discrepancy and how can it be resolved?

Interestingly, the change seems to work fine when running the website locally.

Here's some additional context:

The JavaScript was bundled using the ASP MVC bundling system. The specific code that was altered is as follows:

$('#welcome-messages ul').bxSlider({
    mode: 'vertical',
    auto: true,
    minSlides: 1,
    responsive: true,
    touchEnabled: true,
    pager: false,
    controls: false,
    useCSS: false,
    pause: 10000 // HERE
});

changed to

$('#welcome-messages ul').bxSlider({
    mode: 'vertical',
    auto: true,
    minSlides: 1,
    responsive: true,
    touchEnabled: true,
    pager: false,
    controls: false,
    useCSS: false,
    pause: 3000 // TO HERE
});

If you'd like to view the minified file generated by ASP MVC for the website:

$("#welcome-messages ul").bxSlider({mode:"vertical",auto:!0,minSlides:1,responsive:!0,touchEnabled:!0,pager:!1,controls:!1,useCSS:!1,pause:1e3});

In summary, I adjusted the pause time between slides from 10 seconds to 3 seconds, yet the website continues to exhibit a 10-second delay despite the JavaScript modification.

I'm also curious about accessing the files uploaded to the Azure website. Other hosting platforms typically provide options such as file managers or FTP access. Can Azure websites' root folders be accessed using FTP as well?

Answer №1

If you're having trouble not seeing the latest file, it could be due to your browser caching the files. Try clearing your browser cache and trying again.

I'm also curious about how I can access the files I uploaded to my azure website. Other web hosts usually provide a file manager or FTP access. Can we do the same with Azure websites and access the root folders via FTP?

If you used a publish profile file to deploy your application, open that file in a text editor. You will find FTP credentials within the file (see example below)

<publishData>   <publishProfile profileName="mytestwebsite - Web Deploy" publishMethod="MSDeploy" publishUrl="mytestwebsite.scm.azurewebsites.net:443" 
                  msdeploySite="mytestwebsite" userName="$mytestwebsite" userPWD="<cryptic password>" 
                  destinationAppUrl="http://mytestwebsite.azurewebsites.net" 
                  SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com">
    <databases/>   </publishProfile>   <publishProfile profileName="mytestwebsite - FTP" publishMethod="FTP" publishUrl="ftp://waws-prod-blu-015.ftp.azurewebsites.windows.net/site/wwwroot"

                  ftpPassiveMode="True" userName="mytestwebsite\$mytestwebsite" 
                  userPWD="<cryptic password>" 
                  destinationAppUrl="http://mytestwebsite.azurewebsites.net" 
                  SQLServerDBConnectionString="" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="http://windows.azure.com">
    <databases/>   </publishProfile> </publishData>

You can download this file from the "Dashboard" section of your Azure Website on the Azure Portal.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I execute JavaScript within a for loop in the server-side code?

protected void Button1_Click(object sender, EventArgs e) { for (int i = 0; i < 100; i++) { Page.ClientScript.RegisterClientScriptBlock(GetType(), "myScript", "<script>alert('hello world');</script>"); } } Is th ...

Preventing Broken URLs in Jquery each

What is the best way to prevent taking images with broken URLs? jQuery.each(jQuery('img'), function(index, obj) { imageStack.add(jQuery(obj)); }); ...

The .each method is failing to iterate over the next object

Currently, I have been working with JSON data retrieved from the web. After successfully receiving the data, I proceed to create a JavaScript object to work with it. However, there seems to be an issue with retrieving the values of fname and lname from th ...

Java script pop-up notifications always show up

This Text Goes Above the Form <?php require_once "core-admin/init-admin.php"; if( !isset($_SESSION['admin_username']) ){ $_SESSION['msg'] = 'page cannot be opened'; header('Location:admin_login.php&ap ...

Finding out the specific row that was clicked in a Jquery Mobile listview

I've searched everywhere and can't find a solution. How can I retrieve the value of a row tapped in a listview? This could be anything from the name to the index within the object. Currently, I have a function handling the tap event. I need to pa ...

I would like to retrieve an array of objects containing state and count information from this data in ReactJS

I have a dataset stored in an array of objects as follows [{name,state},{name,state},{name,state},{name,state},{name,state}]. I am interested in extracting the state data along with the number of people belonging to each state. To achieve this, I would l ...

Node replication including a drop-down menu

Is there a way to clone a dropdown menu and text box with their values, then append them to the next line when clicking a button? Check out my HTML code snippet: <div class="container"> <div class="mynode"> <span class=& ...

What is the best way to call upon a necessary module from various files?

When working with Node.js, I am using Socket.io in my main.js file like this: const io = require('socket.io')(http); Additionally, I have a separate "sub" file called api.js where I delegate some of my business logic. To include this file, I us ...

"The Material-UI ListItem component acts as a link, updating the URL but failing to render the expected

Seeking help for the first time on this platform because I am completely perplexed. I'm working on coding a navbar for my school project website using Material-UI's List component within the Appbar component. However, I have encountered two issu ...

The setInterval function is active in various components within Angular 6

Recently, I started using Angular(6) and incorporated the setInterval function within a component. It's functioning properly; however, even after navigating to another route, the setInterval continues to run. Can someone help me determine why this is ...

getting information from a JSON array using AngularJS

Looking to extract all images from the imagePath array in the following JSON. While retrieving a single image works fine, encountering difficulties when trying to fetch the entire imagePath array. Any help with this issue would be greatly appreciated. Than ...

Guide to dynamically loading a component using a variable name in Vue.js?

Is it possible to dynamically load a component in a vue.js application using a variable name? For example, if I have the following component registered: <template id="goal"> <h1>Goal:{{data.text}}</h1> </template> Instead of di ...

Tips for identifying and logging out a dormant user from the server side using Angular 2 Meteor

I'm currently diving into Angular 2 Meteor and working on a project that requires logging out the user when they close their browser window. I also need them to be redirected to the login page when they reopen the app. After searching online, I could ...

Utilizing Node.js to Retrieve Data from MySQL

Hi there, I'm new to NodeJS and I'm curious about how to fetch a MySQL query like we do in PHP. $query = mysql_query("SELECT * FROM accounts"); while($fetch = mysql_fetch_array($query)) { echo $fetch['Username']; } How would this be ...

Best practices for handling http requests in each individual route of AngularJs

Just starting out with AngularJs and attempting to set up multiple routes with different $http requests. I'm facing an issue where the page content loads late after a route change. I've come up with a workaround, but I feel like there might be a ...

Populate an HTML5 arc with an image - Leveraging the power of HTML5 Canvas

I'm working with an HTML5 Canvas (JSFiddle) that currently displays circles created using the following function: function createball(x,y,r,color){ context.beginPath(); context.arc(x,y,r,0,Math.PI*2,true); context.fillStyle = color; c ...

What is the best way to utilize a JavaScript variable as a background within an inline style sheet?

I have a fun project for this evening - I am trying to make my website load a different background image every time the page is refreshed. Earlier on in this project, I managed to make the background interact with window size and screen resolution similar ...

css: positioning images with overlap in a responsive layout

Two divs have been created with background images, both displaying the same image but in different colors - one grey and the other green. These images are waveforms. Initially, only the grey image (div1) is visible while the green image (div2) remains hid ...

Obtain the complete shipping address with the 'addressLines' included using Apple Pay

Currently working on integrating Apple Pay WEB using JS and Braintree as the payment provider. In order to calculate US sales tax for the order, I need to gather certain information. The user initiates the payment process by clicking on the "Pay with Appl ...

JavaScript closures and the misinterpretation of returning values

function generateUniqueCelebrityIDs(celebrities) { var i; var uniqueID = 100; for (i = 0; i < celebrities.length; i++) { celebrities[i]["id"] = function () { return uniqueID + i; }; }; return celebrities; ...