为什么更新的javascript文件没有在部署的网站上执行;asp MVC在azure网站

Why is updated javascript file not executed on a deployed website; asp MVC on azure website

本文关键字:网站 执行 asp MVC azure 更新 文件 为什么 部署 javascript      更新时间:2023-09-26

我需要对我在azure网站上部署的asp mvc网站上的javascript文件进行一点更改。所以我重新部署了一切,当我打开网站并检查资源文件时,我看到javascript被改变了。然而,网站的行为似乎并没有改变。它的行为就像旧的javascript告诉它做的那样。问题是什么,解决办法是什么?

附加信息:

我通过asp MVC捆绑系统捆绑了javascript。下面是我修改的代码:

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

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

如果你想看到asp MVC制作并附加到网站的缩小文件:

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

总之,我将每张幻灯片的PAUSE时间从之前的10秒设置为3秒。然而,即使更改了javascript,网站仍然会暂停10秒。

我也想知道,我如何浏览我上传到azure网站的文件?在其他网络主机中,他们通常有文件管理器,或者使用ftp。顺便说一句,我们也可以使用ftp访问azure网站根文件夹吗?

关于没有看到最新文件,请检查浏览器是否没有缓存文件。请删除浏览器缓存再试一次。

我也想知道,我怎么才能浏览我上传到azure的文件网站?在其他网络主机中,它们通常有文件管理器或使用ftp。顺便说一句,我们也可以访问azure网站根文件夹使用ftp ?

如果使用发布配置文件部署应用程序,请在文本编辑器中打开该文件。您将在该文件中看到FTP凭据(请参阅下面的示例文件内容)

<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>

您可以通过访问Azure门户中Azure网站的"仪表盘"部分下载此文件。