Forcing a .net 1.1 web application to always use the 1.1 framework


G

Guest

A little background…
We have multiple web servers in a farm and are starting to upgrade some
applications to 1.1 by re-compiling in VS2003.
One of the things out of our direct control is the framework version on the
application directory. I'm worried that in the future some directories could
be reverted back to 1.0 on all or some of the servers.

I was hoping I could force the applications I choice to always use 1.1 by
putting this in the web.config, hence overriding what the virtual/application
is configured to use.
<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
</startup>
</configuration>

But I noticed that if the application directory is1.0 and check the version
of a web page using Environment.Version.ToString(), it still says the
application is running 1.0 even though I specified v1.1.4322 in the
web.config.

So besides changing the application directory are there any other ways to
verify/force the applications to use the 1.1 framework?

Thanks
 
Ad

Advertisements

J

Jc Morin

Hi,
I know you can configure per web site / virtual directory a specific version
of the .NET framework.

IIS -> Properties of a Web site.

Go in ASP.NET tab. There is a drop down list with all installed version of
the .NET framework on your server.

Hope that help.
 
B

bruce barker

no. the version of asp.net is controlled by the IIS mappings.

-- bruce (sqlwork.com)

| A little background.
| We have multiple web servers in a farm and are starting to upgrade some
| applications to 1.1 by re-compiling in VS2003.
| One of the things out of our direct control is the framework version on
the
| application directory. I'm worried that in the future some directories
could
| be reverted back to 1.0 on all or some of the servers.
|
| I was hoping I could force the applications I choice to always use 1.1 by
| putting this in the web.config, hence overriding what the
virtual/application
| is configured to use.
| <configuration>
| <startup>
| <supportedRuntime version="v1.1.4322"/>
| </startup>
| </configuration>
|
| But I noticed that if the application directory is1.0 and check the
version
| of a web page using Environment.Version.ToString(), it still says the
| application is running 1.0 even though I specified v1.1.4322 in the
| web.config.
|
| So besides changing the application directory are there any other ways to
| verify/force the applications to use the 1.1 framework?
|
| Thanks
|
 
T

Tampa.NET Koder

You can do this on the command line:

aspnet_regiis.exe -s W3SVC/1/ROOT/SampleApp1

SampleApp1 ==> Your virtual directory
 
T

Tampa.NET Koder

** NOTE:

You must be inside the .NET framework version folder that you want to
configure this site for unless it will default to the most recent installed
version. aspnet_regiis.exe can be found in all of the framework folders. E.g
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 OR,
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705 OR,
C:\WINDOWS\Microsoft.NET\Framework\v<2.0 verision number>
**
 
Ad

Advertisements

G

Guest

So what is the <supportedRuntime version="v1.1.4322"/> used for then, if I
can't use it to force an application to run 1.1?
 
J

Juan T. Llibre

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gnconSupportedRuntimeElement.asp

It's not used to "force" an application
under a particular runtime.

It *does* indicate which versions
of the runtime are supported.

Targetting multiple versions of the runtime
is perfectly possible with <supportedRuntime version=...>


<configuration>
<startup>
<supportedRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.0.3705"/>
</startup>
</configuration>
I think you're referring to :
<requiredRuntime version="v1.1.4322"/>

That *requires* that the app run under 1.1.4322.




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
J

Juan T. Llibre

Yes.

That was a copy-and-mangled-paste typo.

That should have been:
I think you're referring to :
<requiredRuntime version="v1.0.3705"/>

That *requires* that the app run under 1.0.3705.
Thanks for noticing!




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
Ad

Advertisements

S

Steven Cheng[MSFT]

Hi Appdevtech,

Yes, for most desktop or console or Service application, the
<supporteRuntime> is ok to specify the .net runtime version to load.
However, the ASP.NET web application is abit different since it is hosted
in IIS server and the IIS use the aspnet_isapi.dll to communicate with
ASP.NET's managed process , so that dll controls which version of the
runtime to launch, we can switch it through aspnet_regiis.exe tool as some
other member have mentioned. Also, here is a good article discussing on
side-by-side execution in .net framework which has covered diferent kinds
of application's side-by-side execution behaviors:

#Side-by-Side Execution of the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/ht
ml/sidexsidenet.asp

HTH. If you have any further questions, please feel free to post here.

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top