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

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

问题描述

我想增加的httpRuntime executionTimeout 为ASP.NET MVC应用程序的小节。

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

在一个常规的Web应用程序,你可以使用:

In a regular Web App, you could use:

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

但真的没有文件夹在ASP.NET MVC的想法,所以我怎么会去这样做?

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

让我们假设ASP.NET MVC的路径 /图像/上传与ImagesController和上传操作。

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

推荐答案

您可以包括在&lt整个MVC路径(控制器和动作);地点&gt;标签的路径属性。像这样的东西应该工作:

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天全站免登陆