使用 .net core 2.1 和 Azure 上传大文件
Uploading big files with .net core 2.1 and Azure
你能帮忙吗,有下一个问题:
无法将大文件 (~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 时失败并显示错误:
"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
请问有什么问题吗?我应该在 Azure 中设置任何东西来上传大文件吗?或者如何正确设置web.config(我在我的项目中找不到它)?
谢谢!
Or how correct setup web.config(i can't find it in my project)?
将 .net 核心项目部署到 Azure 时,您可以转到 https://xxxxx.scm.azurewebsites.net
并单击 Debug console> CMD > site > wwwroot > web.config
。 web.config
将在那里。然后您可以将请求限制增加到 200MB,如下所示:
<system.webServer>
<security>
<requestFiltering>
<!-- 100 MB in bytes -->
<requestLimits maxAllowedContentLength="209715200" />
</requestFiltering>
</security>
</system.webServer>
这里有一个类似的 你可以参考。
你能帮忙吗,有下一个问题:
无法将大文件 (~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 时失败并显示错误: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
请问有什么问题吗?我应该在 Azure 中设置任何东西来上传大文件吗?或者如何正确设置web.config(我在我的项目中找不到它)?
谢谢!
Or how correct setup web.config(i can't find it in my project)?
将 .net 核心项目部署到 Azure 时,您可以转到 https://xxxxx.scm.azurewebsites.net
并单击 Debug console> CMD > site > wwwroot > web.config
。 web.config
将在那里。然后您可以将请求限制增加到 200MB,如下所示:
<system.webServer>
<security>
<requestFiltering>
<!-- 100 MB in bytes -->
<requestLimits maxAllowedContentLength="209715200" />
</requestFiltering>
</security>
</system.webServer>
这里有一个类似的