views:

835

answers:

3

I am really stuck with this Parser Error Message telling me "Could not load the assembly 'App_Web_amlohswi'. Make sure that it is compiled before accessing the page." I have been looking around for a few hours checking different posts here and googling information. I have found out that I need to set up a new Application Pool that runs .NET 2.x.

(On a side note, my app is being developed in .NET 3.5, is there a way to set it up to use 3.5 instead of 2.x?)

Can someone provide me with a good explaination on how to set this up properly and (optionally) why is it necessary?

I am more used to developing in PHP so I am used to edit src >> upload >> success!

Thanks!

+3  A: 

ASP.NET 3.5 sites run in 2.0 app pools as long as that version of .NET is installed on the system.

You may have to set up web.config properly. Visual Studio should do this for you when you create a new project.

You should also make sure you don't combine 1.1 and 2.0 applications in the same app pool. Try putting it in a separate app pool and see that helps.

Cristian Libardo
+1  A: 

Here is how you use 3.5 in IIS. All hail Hansleman!

Andrew Bullock
+2  A: 

Since @Trull provided you with a link to the "how", I'll chime in with the why.

.Net 3.5 just builds on the base .Net 2.0 libraries so you don't need to set it up for 3.5. .Net 2.0 and .Net 1.1/1.0 share some of the same name spaces and classes and therefore you need to choose which set of libraries you want to use with your application. Since your application uses the libraries from .Net 2.0, you need your app pool set up to load these libraries for your application rather than the .Net 1.1 libraries. You will also need .Net 3.5 installed on the web server, even though you only configure the app to use the (base) .Net 2.0 libraries.

This would basically be the equivalent of different versions of PHP. You would expect an application written using PHP 5 (and taking advantage of constructs in PHP 5) to work with a PHP4 interpreter. You'd need to upgrade to the newest interpreter (or at least choose the newer one if both are installed) before your app would work. It's the same with .Net -- you need to choose the right version, the version that your code expects to reference before it will work.

tvanfosson