简体   繁体   中英

Running a ASP.NET 4 app in .NET 2.0 app pool

I recently upgraded a .NET 2.0 app to .NET 4 and everything works great.

When I setup IIS I selected .NET 2.0 under the ASP.NET tab in IIS 6.

The app runs fine but I get these intermittent ViewState errors.

Could the IIS setup be causing the ViewState issues?

Probably because view state in .Net 4 uses a different algorithm than earlier

ASP.NET uses both encryption and hashing algorithms to help secure data such as forms authentication cookies and view state. By default, ASP.NET 4 now uses the HMACSHA256 algorithm for hash operations on cookies and view state. Earlier versions of ASP.NET used the older HMACSHA1 algorithm.

ASP.NET 4 Breaking Changes


You need to register .Net Framework 4.0 in IIS, then run your site under Application pool for .Net 4.0

您需要注册4.0框架,此链接将为您提供帮助: http : //msdn.microsoft.com/zh-cn/library/k6h9cz8h.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM