ASP.NET MVC 和 httpRuntime executionTimeout [英] ASP.NET MVC and httpRuntime executionTimeout

查看:28
本文介绍了ASP.NET MVC 和 httpRuntime executionTimeout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为 ASP.NET MVC 应用程序的一个子部分增加 httpRuntime executionTimeout.

在常规 Web 应用程序中,您可以使用:

<预><代码><配置><location path="UploadPage.aspx"><httpRuntime executionTimeout="600"/></位置></配置>

但是在 ASP.NET MVC 中确实没有文件夹"的概念,那么我该怎么做呢?

让我们假设 ASP.NET MVC 路径是 /Images/Upload,带有一个 ImagesController 和 Upload Action.

解决方案

您可以在 <location> 中包含整个 MVC 路径(控制器和操作).标签的路径属性.这样的事情应该可以工作:

<system.web><httpRuntime executionTimeout="600"/></system.web></位置>

I would like to increase the httpRuntime executionTimeout for a subsection of an ASP.NET MVC application.

In a regular Web App, you could use:

<configuration>
  <location path="UploadPage.aspx">
    <httpRuntime executionTimeout="600"/>
  </location>
</configuration>

However there really is not the idea of "Folders" in ASP.NET MVC, so how would I go about doing this?

Lets assume the ASP.NET MVC path is /Images/Upload with an ImagesController and Upload Action.

解决方案

You can include the whole MVC path (controller and action) in the <location> tag's path attribute. Something like this should work:

<location path="Images/Upload">
    <system.web>
        <httpRuntime executionTimeout="600" />
    </system.web>
</location>

这篇关于ASP.NET MVC 和 httpRuntime executionTimeout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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