- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
不工作?-6ren"> 不工作?-我有一个很长的查询字符串值需要传入(我理解这本身就是一个有问题的做法),但我无法让它在我的 Appharbor 上生效。应用实例。 在本地,我对我的 web.config 进行了此更改并确认有问题的 -6ren">
我有一个很长的查询字符串值需要传入(我理解这本身就是一个有问题的做法),但我无法让它在我的 Appharbor 上生效。应用实例。
在本地,我对我的 web.config 进行了此更改并确认有问题的 URL 在本地有效:
<httpRuntime maxQueryStringLength="2097151"/>
并确保它存在于由我的 Web.Release.config 转换后的结果 web.config 中。就是说,当我推送到 AppHarbor 时,转换应该会恢复...但我仍然收到此异常:
The length of the query string for this request exceeds the configured maxQueryStringLength value.
堆栈跟踪:
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
有什么想法吗?感谢您的帮助。
最佳答案
我最初的测试是针对 Cassini(VS 2010 的内置网络服务器)完成的。我在本地推送到 IIS 7.5 并发现此错误:
HTTP Error 404.15 - Not Found
The request filtering module is configured to deny a request where the query string is too long.
出现是因为我没有在 <system.webServer>
中指定 maxQueryLength我的 web.config 部分以及 <httpRuntime>
.所以答案是同时指定 <system.web>
和 <system.webServer>
部分:
<system.web>
<httpRuntime maxQueryStringLength="2097151"/>
</system.web>
然后:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="2097151"/>
</requestFiltering>
</security>
</system.webServer>
当我将这个版本的配置推送到 AppHarbor 时,一切都很好。希望这会有所帮助。
关于web-config - AppHarbor - 为什么我的 <httpRuntime maxRequestQueryStringLength ="XXXX"/> 不工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8933820/
我们可以为 HttpRuntime 缓存中的项目设置的最长过期时间是多少...? 另外,默认的过期时间是多少? public static void Add(string pName, object
我计划创建一个 Sharepoint 计时器作业并将其配置为在我们所有的农场 Web 前端计算机上运行。 计时器作业将从 SP SQL Server 实例读取数据,并希望将其更新到我们拥有的 2 个
虽然我已经指定了一个唯一的键,但似乎以下代码将为 5 个请求返回一个值,然后为接下来的几个请求返回另一个值,然后恢复到原始请求中保存的值并继续,直到有 10 个请求不同的对象都存储在同一个 key 下
我有一个简单明了的问题。我正在处理的网络应用程序正在使用单元测试(接近 1500 个测试)。由于需要对应用程序进行修改,因此多项测试失败,因为 HttpRuntime.BinDirectory 没有值
谁能告诉我这段代码在做什么: PropertyInfo p = typeof(HttpRuntime).GetProperty("FileChangesMonitor",
我有一个线程在我的 ASP.Net 后面运行。在这个线程中,我将数据放入缓存中,如下所示: HttpRuntime.Cache.Insert("test", "test", null, DateTim
我正在尝试从 HTTPRuntime 缓存中保存和检索图像,但出现异常。我能够将流保存到缓存中,但是当我尝试检索它时,出现异常: the request was aborted. The connec
是否可以从另一个应用程序检索 HttpRuntime.Cache? 我有两个应用程序, 例如应用-A、应用-B 在 App-A 中,我正在向缓存中插入值 HttpRuntime.Cache.Inser
在我的工作地点,我们有一个 ASP.NET 页面,它使用以下代码来执行文件下载。我们使用它而不是 Request.TransmitFile(),因为该文件直接来自 zip 存档。 privat
我有一个控制台应用程序需要在我的 API 应用程序中动态加载所有端点并获取缓存数据的详细信息。 foreach (var routeTemplate in listRouteTempplate
我对以下代码有疑问。我有以下代码, if (HttpRuntime.Cache[cacheKey] == null) {
我们在 ASP.NET 中使用 HttpRuntime.Cache API 来缓存从数据库检索的数据。 对于这个特定的应用程序,我们的数据库查询具有很多参数,因此我们的缓存键看起来像这样: table
我正在尝试实现具有缓存功能的 Web 应用程序。我需要缓存的原因是我们有一个应用程序可以让用户访问在线类(class)。现在,一旦用户登录,我就会根据我们的数据库验证他。验证后,我想将用户 ID 和类
与使用简单静态字段相比,使用 HttpRuntime 缓存的主要优点和缺点是什么? 我需要在整个 ASP.NET 应用程序的范围内存储数据。 HttpRuntime.Cache["MyData"] =
过去,我对访问 HttpRuntime.Cache 机制设置了锁定。我不确定我过去是否真的研究过这个问题并盲目地用一把锁把它包围起来。 您认为这真的有必要吗? 最佳答案 这篇文章建议应该使用锁: ht
我知道大多数人推荐使用 HttpRuntime.Cache,因为它具有更大的灵 active ……等等。但是如果您希望对象在应用程序的整个生命周期内持久保存在缓存中怎么办?使用 Application
我一直在使用 HttpRuntime 缓存在一个内部 [dasboard] asp.net 应用程序上缓存简单的用户首选项,该应用程序每天被近 200 名用户使用。 我只是缓存诸如上次查询条件、比例、
我正在考虑在我的 ASP.NET Web 应用程序中实现一些缓存以提高性能。我读过关于 HttpRuntime.Cache 的文章,它似乎就是为此而生的。唯一的问题是我想潜在地缓存大量数据(主要是 S
假设我有这样的东西: string TheFile = HttpRuntime.AppDomainAppPath + "\\SomeDir\\" + TheFilename + ".js"; Syst
我环顾四周,尚未找到一种在文件大小配置部分和我允许的最大值之间同步的方法。这可能吗? 在 web.config 文件中允许非常大的文件大小,然后在实现中强制使用较小的文件大小是否只是最佳实践? 最佳答
我是一名优秀的程序员,十分优秀!