asp.net: Change .NET version in Web.config

  • Thread starter Thread starter meo
  • Start date Start date
M

meo

Can I select version of .NET compiler to run my ASP.NET web application?

I thought I can select version of compiler by config in Web.config when I
need to change between 1.0 or 1.1

But in ASP.NET 2.0, Can I choose?

I see the way to change only in IIS but in Web.config, I cannot see at this
moment.

Anybody find the way to set, pls let me know.
 
I don't think it can be done outside of IIS. Web.config is processed by
asp.net, not by IIS. But IIS needs to know what asp.net to invoke to process
the request. Therefore the decision on the asp.net version has to be made
before looking at web.config.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
But in ASP.NET 1.0 and ASP.NET 1.1 can do, I can select version of framework
by setting in Web.config.

It's so pity if this feature has been removed when using ASP.NET 2.0.

In some situtation, we may require to select version of framework by myself
in the config, not IIS. i.e. publish the website to web hosting rental, If I
can select version of framework, that's good and no need to tell admin to
change.

Eliyahu Goldin said:
I don't think it can be done outside of IIS. Web.config is processed by
asp.net, not by IIS. But IIS needs to know what asp.net to invoke to
process the request. Therefore the decision on the asp.net version has to
be made before looking at web.config.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


meo said:
Can I select version of .NET compiler to run my ASP.NET web application?

I thought I can select version of compiler by config in Web.config when I
need to change between 1.0 or 1.1

But in ASP.NET 2.0, Can I choose?

I see the way to change only in IIS but in Web.config, I cannot see at
this moment.

Anybody find the way to set, pls let me know.
 
I don't think it can be done outside of IIS. Web.config is processed by
asp.net, not by IIS. But IIS needs to know what asp.net to invoke to
process the request. Therefore the decision on the asp.net version has to
be made before looking at web.config.

Isn't this what <supportedRuntime version="......." /> is for...?
 
I don't think so, because as Eliyahu pointed out, it's all controlled by an
IIS setting.

OK, so does that configuration option apply only to WinForms apps...?
 
re:
it's all controlled by an IIS setting

....which is set with aspnet_regiis.exe

The <supportedRuntime version="......." /> setting
is ignored by ASP.NET applications.

It's only valid in console and WinForms applications,
and must be placed in the application configuration file's <startup> element.

The application configuration file must have
the same name as the application, with a .config extension.

For an application named myExecutable.exe,
the application configuration file must be named myExecutable.exe.config.

http://msdn.microsoft.com/library/d...de/html/cpcontargetingnetframeworkversion.asp




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
re:

Exactly, as pointed out in my two just-sent posts
( which hadn't arrived yet when I wrote this reply...).

Thanks for the clarification - I had a feeling that would be the case...
 
Back
Top