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

Discussion in 'ASP .Net' started by meo, Mar 22, 2007.

  1. meo

    meo Guest

    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.
    meo, Mar 22, 2007
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
    >
    >
    Eliyahu Goldin, Mar 22, 2007
    #2
    1. Advertising

  3. meo

    meo Guest

    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" <> wrote in
    message news:...
    >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" <> wrote in message
    > news:...
    >> 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.
    >>
    >>

    >
    >
    meo, Mar 22, 2007
    #3
  4. meo

    Mark Rae Guest

    "Eliyahu Goldin" <> wrote in
    message news:...

    >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...?
    Mark Rae, Mar 22, 2007
    #4
  5. I don't think so, because as Eliyahu pointed out, it's all controlled by an
    IIS setting.
    --
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short urls & more: http://ittyurl.net




    "Mark Rae" wrote:

    > "Eliyahu Goldin" <> wrote in
    > message news:...
    >
    > >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...?
    >
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Mar 22, 2007
    #5
  6. meo

    Mark Rae Guest

    "Peter Bromberg [C# MVP]" <> wrote in
    message news:...

    > "Mark Rae" wrote:
    >
    >> "Eliyahu Goldin" <> wrote in
    >> message news:...
    >>
    >> >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...?
    Mark Rae, Mar 22, 2007
    #6
  7. supportedRuntime version only works for console/WinForms apps.

    See :
    http://www.eggheadcafe.com/articles/20030412.asp

    ASP.NET (web-based) applications use aspnet_regiis.exe
    to set the version of the .Net Framework they target.




    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/
    ===================================
    "Mark Rae" <> wrote in message news:...
    > "Eliyahu Goldin" <> wrote in message
    > news:...
    >
    >>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...?
    >
    Juan T. Llibre, Mar 22, 2007
    #7
  8. meo

    meo Guest

    Hope that in the next version, this feature can be done.

    "Juan T. Llibre" <> wrote in message
    news:...
    > supportedRuntime version only works for console/WinForms apps.
    >
    > See :
    > http://www.eggheadcafe.com/articles/20030412.asp
    >
    > ASP.NET (web-based) applications use aspnet_regiis.exe
    > to set the version of the .Net Framework they target.
    >
    >
    >
    >
    > 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/
    > ===================================
    > "Mark Rae" <> wrote in message
    > news:...
    >> "Eliyahu Goldin" <> wrote in
    >> message news:...
    >>
    >>>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...?
    >>

    >
    >
    meo, Mar 22, 2007
    #8
  9. 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/
    ===================================
    "Peter Bromberg [C# MVP]" <> wrote in message
    news:...
    >I don't think so, because as Eliyahu pointed out, it's all controlled by an
    > IIS setting.


    > "Mark Rae" wrote:
    >> Isn't this what <supportedRuntime version="......." /> is for...?


    >> "Eliyahu Goldin" <> wrote in
    >> message news:...
    >>
    >> >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.
    Juan T. Llibre, Mar 22, 2007
    #9
  10. re:
    > does that configuration option apply only to WinForms apps...?


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





    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/
    ===================================
    "Mark Rae" <> wrote in message news:%...
    > "Peter Bromberg [C# MVP]" <> wrote in message
    > news:...
    >
    >> "Mark Rae" wrote:
    >>
    >>> "Eliyahu Goldin" <> wrote in
    >>> message news:...
    >>>
    >>> >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...?
    >
    Juan T. Llibre, Mar 22, 2007
    #10
  11. It can't be done. Not in the next version, not ever.

    It's just the way things work.
    See my other posts in this thread for the technical explanation.




    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/
    ===================================
    "meo" <> wrote in message news:%...
    > Hope that in the next version, this feature can be done.
    >
    > "Juan T. Llibre" <> wrote in message
    > news:...
    >> supportedRuntime version only works for console/WinForms apps.
    >>
    >> See :
    >> http://www.eggheadcafe.com/articles/20030412.asp
    >>
    >> ASP.NET (web-based) applications use aspnet_regiis.exe
    >> to set the version of the .Net Framework they target.
    >>
    >>
    >>
    >>
    >> 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/
    >> ===================================
    >> "Mark Rae" <> wrote in message
    >> news:...
    >>> "Eliyahu Goldin" <> wrote in message
    >>> news:...
    >>>
    >>>>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...?
    >>>

    >>
    >>

    >
    >
    Juan T. Llibre, Mar 22, 2007
    #11
  12. meo

    Mark Rae Guest

    "Juan T. Llibre" <> wrote in message
    news:...

    > re:
    >> does that configuration option apply only to WinForms apps...?

    >
    > 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...
    Mark Rae, Mar 22, 2007
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page