Solved

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

Posted on 2010-08-24
1
605 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Split in Javascript 5 30
Connection String 16 42
C# Single Form 8 26
Entity Framework 7 28
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

929 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now