为什么我的 ASP.NET 应用程序在迁移后崩溃了?

发布于 2024-07-11 17:34:24 字数 369 浏览 5 评论 0原文

我的 Web 应用程序在带有 .NET Framework 2.0 的 Windows Server 2003 中运行得非常好。 当我迁移到带有 .NET Framework 3.5 的 Windows Server 2008 时。

在两个服务器中运行相同的代码时,它们之间的区别如下:对于给定的异步 ASSX (IHttpAsyncHandler),前一个服务器会自动使用 Connection 和 Content-Length 标头应答请求。 由于新服务器没有使用以前的代码自动生成这些标头,因此我必须更改代码以手动执行此操作,否则 Web 客户端无法确定响应的结束。

我的问题是,.NET Framework 3.5 不应该保持与 .NET 2.0 的完全向后兼容性吗?

My web application worked very well in a Windows Server 2003 with .NET Framework 2.0. When I migrated to Windows Server 2008 with .NET Framework 3.5.

With the same code running in both servers the difference between them was the following: for a given async ASHX (IHttpAsyncHandler) the previous server automatically answered the request with the Connection and Content-Length headers. As the new server didn't automatically generated those headers with the previous code, I had to alter the code to do it manually, or otherwise the web clients couldn't determine the end of the response.

My question is, isn't .NET Framework 3.5 supposed to maintain full backwards compatibility with .NET 2.0?

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

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

发布评论

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

评论(2

舂唻埖巳落 2024-07-18 17:34:24

将应用程序池模式设置为经典。

Set the ApplicationPool mode to Classic.

喜你已久 2024-07-18 17:34:24

问题不在于 .Net Framework,而在于 IIS7 和 IIS6 之间的差异。 正如leppie所述,您需要将应用程序池设置为经典模式。

The problem isn't the .Net Framework it's the different between IIS7 and IIS6. As leppie stated you need to set the application pool to classic mode.

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