FTP中的文件与传递的内容不匹配 [英] Files in FTP don't match the delivered content

查看:121
本文介绍了FTP中的文件与传递的内容不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已将VSTS设置为持续部署到我们的azure应用程序服务中.服务计划是基本的:1中-因此我们没有任何部署槽.直到几天前,一切都运转良好.突然有一个JSON文件(/site/wwwroot/assets/appconfig.json) 没有再交付给用户-发生404.为了确保文件确实存在,我使用ftp连接到了我的站点.文件在那里.然后,我在同一目录中测试了另一个文件-将该文件发送到 浏览器.然后,我重命名了工作文件,并且奇迹般地,我仍然可以通过网络访问旧名称的文件.文件的新名称不起作用.因此,我必须得出结论,我通过FTP看到的文件实际上不是 通过https交付.到现在为止我还缺少任何隐藏功能吗?顺便提一句.我已经多次重启了该服务,并且还从VSTS重新部署,但没有成功.

We have set up VSTS with continuous deployment to our azure app service. The service plan is Basic: 1 Medium - therefore we don't have any deployment slots. Everything was working just fine until some days ago. Suddenly a JSON file (/site/wwwroot/assets/appconfig.json) was not delivered any more to the user -a 404 occured. Just to make sure that the file actually exists I connected with ftp to my site. The file was there. Then I tested an other file in the same directory - and that was no problem this file was sent to the browser. Then I renamed the working file and miraculously I could still access the file with the old name over the web. The new name of the file was not working. Therefore I must conclude that the files that I see with FTP are not actually the files which are delivered over https. Is there any hidden feature that I was missing until now? Btw. I have already restarted the service several times and I have also redeployed from VSTS but without any success.

推荐答案

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <remove fileExtension=".json" />
            <mimeMap fileExtension=".json" mimeType="application/json" />
        </staticContent>
    </system.webServer>
</configuration>

已讨论了类似的问题 这里.

Similar issue has been discussed here.

参考: https://blogs.msdn.microsoft.com/africaapps/2013/06/07/how-to-serve-static-json-files-from-a-windows-azure-website/.

Reference: https://blogs.msdn.microsoft.com/africaapps/2013/06/07/how-to-serve-static-json-files-from-a-windows-azure-website/.

------ -------------------------------------------------- ---------------------------------------------

如果此答案有帮助,请单击标记为答案"或投票.要提供有关您的论坛体验的其他反馈,请单击

If this answer was helpful, click "Mark as Answer" or Up-Vote. To provide additional feedback on your forum experience, click here


这篇关于FTP中的文件与传递的内容不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆