作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
请您帮忙解决下一个问题:
无法将大文件(~200 MB)上传到网站。使用.net core 2.1项目和Azure blob。所以发现我应该设置
<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="100000"/>
</system.web>
和
<requestLimits maxAllowedContentLength="1073741824" />
在web.config中,但无法设置,所以发现我可以在applicationhost.config中进行
之后,在本地计算机上工作,但将项目部署到 Azure 时失败并显示错误:“您要查找的资源已被删除、更名或暂时不可用。”
您能告诉我可能出现什么问题吗?我应该在 Azure 中设置任何内容来上传大文件吗?或者如何正确设置 web.config(我在我的项目中找不到它)?
谢谢!
最佳答案
Or how correct setup web.config(i can't find it in my project)?
当您将.net core项目部署到Azure时,您可以转到https://xxxxx.scm.azurewebsites.net
并单击调试控制台> CMD > site > wwwroot > web.config
。 web.config
将在那里。然后您可以将请求限制增加到 200MB,如下所示:
<system.webServer>
<security>
<requestFiltering>
<!-- 100 MB in bytes -->
<requestLimits maxAllowedContentLength="209715200" />
</requestFiltering>
</security>
</system.webServer>
这是一个类似的issue你可以引用一下。
关于.net - 使用.net core 2.1和Azure上传大文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54484169/
我有以下正则表达式 /[a-zA-Z0-9_-]/ 当字符串只包含从 a 到z 大小写、数字、_ 和 -。 我的代码有什么问题? 能否请您向我提供一个简短的解释和有关如何修复它的代码示例? //var
我是一名优秀的程序员,十分优秀!