VS 2010 ASP.NET开发服务器提供静态文件时出现异常

发布于 2024-08-09 19:10:39 字数 811 浏览 3 评论 0原文

我正在使用 Visual Studio 2010 Beta 2 构建一个 ASP.NET MVC 2 网站。

我的图像或 css 突然没有开始显示。如果我直接导​​航到浏览器中的资源,我会看到以下异常消息:

指定的参数超出了 有效值的范围。参数名称: UTC日期

堆栈跟踪:

[参数超出范围异常: 指定的参数超出了 有效值的范围。参数名称: UTCDate]
System.Web.HttpCachePolicy.UtcSetLastModified(日期时间 UTCDate) +3038942
System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext 上下文,字符串覆盖VirtualPath) +1130 System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext 上下文,AsyncCallback 回调, 对象状态)+347
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8683736 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,布尔值&同步完成) +184

一些注意事项:

已经尝试重新启动 vs 2010、关闭所有网络服务器实例、重新启动 IIS。

I'm building an ASP.NET MVC 2 site with Visual Studio 2010 Beta 2.

Out of nowhere none of my images or css started showing up. If I navigate directly to the resources in the browser I see this exception message:

Specified argument was out of the
range of valid values. Parameter name:
utcDate

Stack Trace:

[ArgumentOutOfRangeException:
Specified argument was out of the
range of valid values. Parameter name:
utcDate]
System.Web.HttpCachePolicy.UtcSetLastModified(DateTime
utcDate) +3038942
System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext
context, String overrideVirtualPath)
+1130 System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext
context, AsyncCallback callback,
Object state) +347
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+8683736 System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously)
+184

Some Notes:

Already tried restarting vs 2010, closing all the webserver instances, restarting IIS.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你丑哭了我 2024-08-16 19:10:39

通过将计算机的时钟数据设置为未来的方式,在调试模式下构建项目,然后将时间向后移动来解决此问题。

通过谷歌搜索,我发现这是因为您试图加载将来最后修改的程序集。基本上是时间旅行编码。

我遇到的另一个问题是,一旦我将时间设置为未来,我的 VS2010 评估期就到期了。


哈哈,这是因为夏令时,我完全忘记了。

Fixed this by setting my computer's clock data way into the future, build the project in debug mode, and then moved the time back.

From googling around I found this is because your trying to load assemblies that were last modified in the future. Time travel coding basically.

The other problem I had was once I set the time into the future, my VS2010 evaluation period expired.


Lol, this was because of daylight savings time which I completely forgot about.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文