We had a requirement today to run a DotNetNuke Website in .Net 4.0 as some code we are using as part of the Microsoft CRM 2011 SDK require .Net 4.0.
Problem is that with many of the DotNetNuke websites, they have some references that will cause this error when you flip your website worker process to 4.0. in IIS.
This will give you an error that looks like this:
Generates an error:
Server Error in ‘/’ Application.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1703: An assembly with the same identity ‘System.Web.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ has already been imported. Try removing one of the duplicate references.
[No relevant source lines]
Source File: Line: 0
Show Detailed Compiler Output:
Interestingly too the reference to Version=220.127.116.11 initially said Version-18.104.22.168 until the second page refresh on the error.
The problem in our case, and it may differ with others, related to an older file for Microsoft Ajax.
There is a file called: System.Web.Extensions.dll
in the \bin folder.
We renamed this to: System.Web.Extensions.dll.bak
And our problem was fixed.
This is due to an older way that Microsoft handled Ajax vs the new way in .Net 4.0.
DotNetNuke Support Services
We do offer DotNetNuke support services and would be happy to assist others with this or other DNN problems that need professional support services with.