views:

118

answers:

3

We have a web app depending on the installation of .net framework 1.1. If the user install .net framework 2.0 as an add on or if the user only has .net framework 2.0 installed, certain functionalities are broken resulting in an errormessage starting with :" Message: Request for the permission of type 'system.net.WebPermission,System, Version=2.0.0.0....."

Is there any way i can define that the web app only will use .net framework without modifying the code? Maybe in the web.config of the IIS?

Thanks in advance

+3  A: 

In IIS, go to the ASP.NET tab (folder properties), and change it to 1.x. That should do it.

Marc Gravell
Sorry - you could have kept your answer, though - it was still perfectly valid.
Marc Gravell
Be sure to create a different app pool you cannot run different .net versions in the same app pool
Robin Day
@Marc: Not an issue. It would just clutter up. Rep is not that important, considering the cap!
Mehrdad Afshari
A: 

You should be able to go to the properties of the website in IIS and specify the version of .Net you'll be running under.

Here's how to get there on the server...

Start Menu>(Right+Mouse+Click)MyComputer>Manage>Services And Applications>IIS>Websites>(Right+Mouse+Click) [your website]>Properties>Asp.Net>Asp.Net Version
madcolor
A: 

In IIS you can configure a website to use either installed framework:

  1. In IIS, right-click on the website or application, select properties
  2. goto ASP.NET tab
  3. select the ASP.NET version to use
Chris Pebble
Thanks, but this was tried earlier. I have selected Version 1.1.4322
Ari