locked
running .net 1,1 and .net 2.0 web apps side by side (app pools) RRS feed

  • Question

  • User-694260673 posted

    Hello,

    I have website that has been updated to .net 1.1 to .net 2.0.  The website is now runs under the default app pool (.net 2.0 integrated). 
    There is another website which is a virtual directory of the website that was ported to .net 2.0.  The app pool for this virtual directory is asp.net 1.1
    and it has stopped working since the app pool of the parent website was changed. 

    I have tried changing the app pool of the child web app to the same as the parent but this did not fix problem and when I changed the webchild app back to the
    asp.net 1.1 app pool it also would not work.

    So, can I run a  .net 1.1 virtual directory of a .net 2.0 website?  Does webchild app inherit things from the parentweb app.

    The part of the child website that does not work is some custom login authentication.  The authentication still works but the response.redirect does not
    redirect the user to the correct page, instead it puts them back at the login page.

    Thanks

    Sunday, March 16, 2014 8:59 AM

Answers

  • User-694260673 posted

    Thanks for all the replies.  The problem turned out to be with iis and app pools.  This is what I did to resolve it:

    1. create a new app pool for the web child and set it to .net 1.1 classic mode
    2. switch the web parent app pool to .net 2 classic mode
    3. Edit web configs accordingly (when switching to a classic app pool, the compiler wil complain about settings in the config file)

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 17, 2014 10:26 AM

All replies

  • User281315223 posted

    If you have multiple applications that are running in the same application pool, then that particular App Pool will need to target the lowest version of .NET that you wish to support. Meaning that if you wanted to run a .NET 1.0 app along side a .NET 2.0 app, the pool would need to target 1.0 to support both applications.

    There are numerous ways to handle this - you could consider converting your older 1.0 application to 2.0 and ensuring that you make all of the appropriate changes to targeted the updated framework. If done correctly, this could fix your issue. Another option would be to simply place each of the sites in their own respective application pools targeting different versions of .NET. 

    Sunday, March 16, 2014 9:08 AM
  • User-694260673 posted

    Hi, Thanks for your reply.

    What I did is put the parent website in a .net 2 app pool and I left the child website in the .net 1.1 app pool, but the child website has not worked since I changed the
    app pool of the parent website.  So should I try changing the app pool of the parent to the .net 1.1 app pool?

    Thanks

    Sunday, March 16, 2014 9:16 AM
  • User281315223 posted

    So should I try changing the app pool of the parent to the .net 1.1 app pool?

    Yes, I would give that a try. 

    .NET Frameworks for the most part are pretty good about backwards-compatability and usually a newer version will run on an older version of the framework.

    Sunday, March 16, 2014 9:17 AM
  • User-1716253493 posted
    Yes, you can run net 1 application under net 2 application. Create/add new application pool. Use separate application pool each application.
    Sunday, March 16, 2014 12:06 PM
  • User-694260673 posted

    Thanks I have done that and the site now loads however there is a Response.Redirect in code which not redirecting to the specified page. I am using forms
    authentication which is returning true (isAuthenticated), however the page is not redirected.  If I put 'http://google.com' in the Response.redirect then the page
    redirects to google.

    void btnLogin_Click(Object sender, EventArgs e)
      {
        if (Application.AuthenticateUser(txtUserId.Text, txtPassword.Text))
        {
            try
            {
                //Page.RegisterStartupScript("", "<script language=\"Javascript\">redirect()</" + "script>");
                Response.Redirect("~/home.aspx");//?ReturnURL=" + Page.Server.UrlEncode(Request.QueryString["ReturnURL"].ToString()));
                //Response.Write("i");
                //Response.Redirect(Request.QueryString["ReturnURL"].ToString());
            }
            catch (HttpException ex)
            {
    
            }
       }


    Is there some setting in IIS that needs to be modified?

    Thanks

    Monday, March 17, 2014 7:10 AM
  • User281315223 posted

    Have you tried placing a breakpoint in the code above? Is the Response.Redirect method actually being hit or is an exception being thrown? Your current Response.Redirect code "should" be correct : 

    Response.Redirect("~/home.aspx");

    Have you tried using the direct URL as opposed to the referential one as seen below to see if that makes any difference?

    Response.Redirect("home.aspx");

    Monday, March 17, 2014 9:55 AM
  • Monday, March 17, 2014 10:12 AM
  • User-694260673 posted

    Thanks for all the replies.  The problem turned out to be with iis and app pools.  This is what I did to resolve it:

    1. create a new app pool for the web child and set it to .net 1.1 classic mode
    2. switch the web parent app pool to .net 2 classic mode
    3. Edit web configs accordingly (when switching to a classic app pool, the compiler wil complain about settings in the config file)

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 17, 2014 10:26 AM