Solved

Server Error in '/' Application-Migrated from VS2008 - VS2010.

Posted on 2010-08-24
1
606 Views
Last Modified: 2013-11-27
I have been using VS2008/.net 3.5  on Vista with a number of 3rd party components (including Telerik controls) and successfully upgraded all of these to VS2010/.net 4.0.

The applications run fine on the development machine. Trouble starts when i test on the production server. This is Windows Server 2003 sp2. X64.

 So far on Win2003:
- I have downloaded and installed .NET framework 4.0 X64.
- I have uploaded new VS010 files which run fine on the dev server.
-Changed IIS properties for the apps on the  to use ASPNET4.0 for the test apps.
-Tried to register ASPNET4.0 application pool using regis_iis.exe -ir . Don't know if this worked because  aspnet 4.0 is not available as a selection in the application pool.

I have also looked at the web.config file to ensure no reference is made to the older assemblies for the newer application. this is what happens.  When I have

<compilation debug="true" targetFramework="4.0"/>

I get

-----------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
---------------------------------

I have attached the full web.config file (minus the <apps settings> tag containing passwords)So I have changed this to
    <compilation debug="true"/>

That's when I get :

------
Could not load file or assembly 'eWeb' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'eWeb' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
-------------------

I have struggled with this for hours. (including google! - so I am hoping for more than web links)

Please Help!!!!

 Web.config
0
Comment
Question by:JenebyM
1 Comment
 

Accepted Solution

by:
JenebyM earned 0 total points
ID: 33515949
Hi Guys,

I have been able to resolve this issue in two steps.

1. The settings I changed (use ASP.NET4.0 instead of 2.0) on the virtual directory for the test apps was fine but i had neglected to do the dame on the actual default website folder as well. This immediately cleared the   part of the problem.
2. I then found that after installing .Net framework 4.0 the Web Service Extensions of for ASP.NET 4.0 is set to prohibited by default in IIS. I therefore enabled this.

Both the older .NET 3.5 apps and new .NET 4.0 apps work fine alongside each other on the same server.

PS: There were numerous solutions relating to errors on line  . Those did not work for me and the above did. Conversely, this may not work for you and google may dig up something that does for you.

Thanks

J
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question