我想增加ASP.NETMVC应用程序的一个子部分的httpRuntimeexecutionTimeout.

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

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

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

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

推荐答案

您可以将整个MVC路径(控制器和操作)包含在<;地点>;标记的路径属性.像这样的方法应该有用:

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

Asp.net相关问答推荐

Razor中的共享本地化资源文件

ASP .Net Web API 将图像下载为二进制

将 NUnit 添加到 ASP.NET MVC 测试框架的选项中

IIS Request.UserHostAddress 返回 IPV6 (::1),即使禁用了 IPV6

在 appSettings 中存储字符串数组?

静态字段与会话变量

如何判断一个IP地址是否是私有的?

ASP.NET Core 中的授权. [Authorize] 属性总是 401 Unauthorized

HTTP 错误 401.3 - 未经授权

ASP.NET URL 重写

asp.net 中的 Eval() 有什么用

HttpContext.Current.Cache.Insert 和 HttpContext.Current.Cache.Add 有什么区别

如何判断用户代理是 ipad 还是 iphone?

如何使用 ASP.NET 和 jQuery 返回 JSON

如何在 ASP.net 中使用 wkhtmltopdf.exe

如何使用 ConfigurationManager.AppSettings

ASP.net 网站中的 C# 密码文本框

解耦 ASP.NET MVC 5 标识以允许实现分层应用程序

Visual Studio 2013 ASP.NET 项目中 Antlr 包的用途是什么?

ASP.NET MVC2/3 中runAllManagedModulesForAllRequests的正确用法是什么?