Solved

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

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

10 Experts available now in Live!

Get 1:1 Help Now