ASP.NET 4 Breaking Changes February 20, 2011Posted by Bilal in .NET.
Tags: .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, asp.net, IIS, IIS 6, IIS 7.5, IIS7, Troubleshoot, update, Visual Studio, web.config
add a comment
The ASP.NET 4.0 has been a core update to ASP.NET 2.0. .NET 3.0 and .NET 3.5 were based on .NET 2.0 having additional assemblies only, not the core components. If you have installed all of these frameworks 2.0, 3.0, 3.5, 4.0 and you try to upgrade your ASP.NET 2.0 application, in IIS you will be able to find 2.0 and 4.0 version of the framework only.
Below is the list of the breaking changes in ASP.NET 4.0 that could affect your existing application while upgrading.
- ControlRenderingCompatibilityVersion Setting in the Web.config File
- ClientIDMode Changes
- HtmlEncode and UrlEncode Now Encode Single Quotation Marks
- ASP.NET Page (.aspx) Parser is Stricter
- Browser Definition Files Updated
- System.Web.Mobile.dll Removed from Root Web Configuration File
- ASP.NET Request Validation
- Default Hashing Algorithm Is Now HMACSHA256
- Configuration Errors Related to New ASP.NET 4 Root Configuration
- ASP.NET 4 Child Applications Fail to Start When Under ASP.NET 2.0 or ASP.NET 3.5 Applications
- ASP.NET 4 Web Sites Fail to Start on Computers Where SharePoint Is Installed
- The HttpRequest.FilePath Property No Longer Includes PathInfo Values
- ASP.NET 2.0 Applications Might Generate HttpException Errors that Reference eurl.axd
- Event Handlers Might Not Be Not Raised in a Default Document in IIS 7 or IIS 7.5 Integrated Mode
- Changes to the ASP.NET Code Access Security (CAS) Implementation
- MembershipUser and Other Types in the System.Web.Security Namespace Have Been Moved
- Output Caching Changes to Vary * HTTP Header
- System.Web.Security Types for Passport are Obsolete
- The MenuItem.PopOutImageUrl Property Fails to Render an Image in ASP.NET 4
- Menu.StaticPopOutImageUrl and Menu.DynamicPopOutImageUrl Fail to Render Images When Paths Contain Backslashes
Deploying .NET 4.0 Application on IIS 6.0 November 21, 2010Posted by Bilal in Programming, Web.
Tags: .NET, 2.0, 4.0, asp, asp.net, C#, IIS 6, IIS7, Visual Studio
I had my ASP.NET 2.0 application hosted on Windows 2003 Sever with IIS 6.0. After Visual Studio 2010 or more precisely after .NET Framework 4.0, I upgraded the desktop modules to 4.0 (version 3.0 and 3.5 are superset, not the framework). The transition of desktop application from 2.0 to 4.0 was smooth enough. Although there were some deep level changes required in some scenarios (minor ones) but overall it was simple. The application executed properly in the first attempt.
I updated the Web Modules also but did not deploy them (in production environment only). Recently, it was planned to deploy the upgraded module. I installed the framework 4.0 on the web server and using the existing Publish settings, I published the upgraded application on the server (test server, not making experiments on the production server). On browsing the page, I got a 404 Page not found error. It was really a wired and unexpected situation. I have read about the issue of upgrading from IIS 6.0 to IIS 7.0 specially related to web.config but this transition error was totally not expected.
After a lot of search and attempts, I was able to execute the application. Below are the minimum steps required for it:
- In IIS 6 console, right click you project and click the properties and check the ASP.Net tab whether Framework 4 is selected or not. If not select the framework 4.
- In IIS 6 single application pool can’t be used for two different frameworks. Add a new pool with any meaningful name. Application Pools is above the Default
Website node in the main tree hierarchy. (IIS 7 supports)
- To assign the application pool, in IIS console open the properties section of the web application, and click on the Home Directory tab and select newly created application pool from the drop-down-list.
Basically Page not found issue is cause of other problem which is set hidden by IIS6. But you need to see the real cause.
- For this open IIS6 console and in the main hierarchy, select Web Service Extension node which is right below the Default Website node. You will see the entire ASP.Net framework list over there, by default these frameworks might be set to Prohibited so select ASP.Net Framework 4 and click Allow button.
Browse you website now and it should be working.
If you are having some other errors, check the source link.