After porting working asp.net project to vs 2005, Response.Redirect ends Session

Last post 08-15-2008 12:20 PM by StanDav. 5 replies.

Sort Posts:

  • After porting working asp.net project to vs 2005, Response.Redirect ends Session

    08-21-2007, 1:32 PM
    • Loading...
    • StanDav
    • Joined on 12-05-2005, 10:39 AM
    • Posts 14

    PROBLEM: Ported working vs2003 Asp.net project to VS2005. Response.Redirect terminates the session.

     

    Environment: W2000 Advanced Server, IIS, vb.net

    Both vs 2003 and vs2005 on same machine.

     

    Changed the dll name to appname05.dll so that it would register

    The appname is the same for vs2005 but the location and sitename in the iis was changed. 

    I tried the following prior to ‘response.redirect’

                        Response.AddHeader("P3P", "CP=""CAO PSA OUR""")I tried entering the server path in the browser.Both to no avail.I tried some mods to the web.config such as the machine setting Request anyone experienced with this problem to please respond.     

     

    Thanks,
    Sdav
  • Re: After porting working asp.net project to vs 2005, Response.Redirect ends Session

    08-21-2007, 2:37 PM
    • Loading...
    • johram
    • Joined on 06-13-2006, 10:36 AM
    • Sweden
    • Posts 3,352
    • Moderator

    Maybe if you use Server.Transfer instead of Response.Redirect?

    To my knowledge, the conversion wizard between 2003 and 2005 is not working very well. In my previous projects, the only way to get things working 100% was to recreate all pages in vs2005 and copy-paste the relevant code from the old solution. 

    If this post was useful to you, please mark it as answer. Thank you!
  • Re: After porting working asp.net project to vs 2005, Response.Redirect ends Session

    08-22-2007, 4:54 PM
    • Loading...
    • StanDav
    • Joined on 12-05-2005, 10:39 AM
    • Posts 14

    That is an absolute nightmare. In fact, if were not for the fact that sooner or later MS would abandon support for vs 2003 , I wouldn't ever persue this conversion avenue.

    Anyone else with an approach to resolve this problem?

    Thanks

     

    Thanks,
    Sdav
  • Re: After porting working asp.net project to vs 2005, Response.Redirect ends Session

    08-23-2007, 7:33 AM

    Well for coversion, you could have followed manual conversion, because its not that straighforward. The other thing is do you really need to convert, because both 2003 i.e. 1.1 and 2.0 application can sit together. Another way is to leave the current app as it is and develop any new ones in .net 2.0 and gradually convert but manually without using automation.

    By the way how do you know that session ends on response.redirect?

    Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
  • Re: After porting working asp.net project to vs 2005, Response.Redirect ends Session

    08-23-2007, 1:09 PM
    • Loading...
    • StanDav
    • Joined on 12-05-2005, 10:39 AM
    • Posts 14

    I know the session ends because, I do cleanups in Session_End. The response.redirect uses a session-specific path that will no longer exist, hence failure.

    It becomes extremely complex to maintain a web site using 2 development environments, and in addition have 2 development environments reside on the same machine. The scenario for disaster is that much greater. That, plus the fact that Visual Studio 2005 should as a base, be backwardly compatible, demands that the VS2005 Development Environment WORK. 

    Thanks,
    Sdav
  • Re: After porting working asp.net project to vs 2005, Response.Redirect ends Session

    08-15-2008, 12:20 PM
    • Loading...
    • StanDav
    • Joined on 12-05-2005, 10:39 AM
    • Posts 14

    To ALL:

    I have determined that the Response.Redirect  did not cause Session_termination, but that there is a problem in how Directory.Delete or Directory.CreateDirectory is/are handled in Framework 2.0. The app under Framework 1.1 works fine. 

    Response.Redirect was the messenger, revealing what what was happening, at the eariest moment!!

    Sorry, barking up the wrong tree. Session_End is the right tree.

     

     

     

    Thanks,
    Sdav
Page 1 of 1 (6 items)
Microsoft Communities
Page view counter