3

I have a web app running ASP.NET MVC 2 along with other sites (using ASP.NET MVC 4), updated IIS7 to use .NET 4.5 and my MVC2 app stop working properly:

  1. Issue: (blocker) There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined the solution: comment out a section of web.config, based on http://forums.asp.net/p/1571308/3939106.aspx:

  2. Issue: (blocker) Login stop working, the solution add this line <machineKey validation="SHA1"/> to web.config, based on Login fails after upgrade to ASP.net 4.0 from 3.5:

  3. Issue: One of the views is giving a Compilation Error:

CS0104: 'ContainerType' is an ambiguous reference between 'System.Web.DynamicData.ContainerType' and 'MVFleet2.Core.ContainerType'

on this line :

<%foreach (var specs in (List<ContainerType>)ViewData["ContainerTypes"])

This error never happened before the update, I know the obvious solution is to use the full name for the cast, but I'm looking for a solution so i can force the web app to run in the context of .NET 3.5 and bypass this issues, so i don't have to deal with this and probably more issues in the future... is this possible?

2 Answers 2

1

If you want to use the older version of the framework (.net 3.5), you need to change the Application Pool in IIS to run as .Net 2.0.

Sign up to request clarification or add additional context in comments.

4 Comments

3.5 is really the same CLR as 2.0. Glad I could help.
JOBG, Just curious how did you land in this situation while upgrading from 4.0 to 4.5 on the box? Was your MVC 2 App running under 3.5 before? I could guess that from issue#2 you mentioned in your post.
First I was running under 3.5, then upgrade to 4.0, a couple of weeks later to 4.5, but we didn't realize the problem until the update to 4.5 because that mvc2 site is a test site (dev site), so we don't really test frequently on that web app, maybe the issues were present with the first upgrade to 4.0 and not directly related to 4.5 as the title suggest.
@JOBG That sounds like a more likely scenario.
1

You should fully qualify the ContainerType type definition to MVFleet2.Core.ContainerType.ContainerType.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.