IIS 6.0、Windows Server 2003 中的 CDate 函数错误
我们在 IIS 6.0 上的 Windows 2003 服务器上运行 .NET 2.0 ASMX Web 服务。我们已使用 VB.NET 将旧版 VB 6.0 应用程序迁移到 .NET 2.0 应用程序。 CDATE 函数在很多地方都使用,我们没有用 .NET 等效日期函数替换它。迁移后,代码可以正常运行很多年。
最近,我们开始在生产服务器上遇到问题,以下代码失败:
CDATE("11 Jul 2011 21:10:27")
Error: Conversion from string "11 Jul 2011 21:10:27" to type 'Date'无效。
如果我们执行 iisreset,相同的代码就会开始正常工作。这是否是由于 Windows 服务器/.NET 补丁的最新补丁所致?
请帮助我们解决这个问题。
谢谢, 加亚斯里
We are running .NET 2.0 ASMX web services on Windows 2003 server on IIS 6.0. We have migrated a legacy VB 6.0 application to .NET 2.0 application using VB.NET. CDATE function is used at many places and we did not replace that with .NET equivalent date functions. After migration, code was working fine for many years.
Recently, we have started encountering issues on our production servers where the below code fails:
CDATE("11 Jul 2011 21:10:27")
Error: Conversion from string "11 Jul 2011 21:10:27" to type 'Date' is not valid.
If we perform an iisreset, the same code starts working fine. Could this be due to some recent patch for Windows server/ .NET patch?
Please help us to resolve this issue.
Thanks,
Gayathri
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试将它们转换为如下内容:
查看 MSDN ParseExact了解更多信息。尽管如此,这并不能解释可能发生了什么变化。
You can try converting them to something like this:
Check this out MSDN ParseExact for more information. Although, that doesn't explain what may have changed.