Results 1 to 8 of 8

Thread: web application + sessions

  1. #1

    Thread Starter
    PowerPoster motil's Avatar
    Join Date
    Apr 2009
    Location
    Tel Aviv, Israel
    Posts
    2,143

    web application + sessions

    hi.

    is session state must get destroyed each time we are building our project in web applications? this is really annoying because i have to re-log and get to the page i'm currently working on each time i need to build my project...

    is there a way around it ?
    * Rate It If you Like it

    __________________________________________________________________________________________

    "Programming is like sex: one mistake and you’re providing support for a lifetime."

    Get last SQL insert ID

  2. #2
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Re: web application + sessions

    You can change the timeout value to be longer, changing the timeout value in your local web.config file (value is in minutes):

    Code:
    <system.web>
        <authentication mode="Forms">
              <forms timeout="xxxxxx"/>
        </authentication>
    </system.web>

  3. #3
    Lively Member
    Join Date
    Jan 2010
    Location
    Republic of Macedonia
    Posts
    114

    Re: web application + sessions

    If i have missed the point then please take a look at the optional way:
    Code:
      <system.web>
        <sessionState cookieless="true" timeout="xxxxxxx" />
      </system.web>

  4. #4

    Thread Starter
    PowerPoster motil's Avatar
    Join Date
    Apr 2009
    Location
    Tel Aviv, Israel
    Posts
    2,143

    Re: web application + sessions

    hi

    the session is not been destroyed because it been timed out, every time you build your application (F6 / CTRL + SHIFT + B) when working with ASP.NET web application (not website) project, your sessions is also gets reset.
    * Rate It If you Like it

    __________________________________________________________________________________________

    "Programming is like sex: one mistake and you’re providing support for a lifetime."

    Get last SQL insert ID

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: web application + sessions

    Hey,

    What you are describing is exactly what I would expect to happen, and I am not aware of any way to get around this.

    Short of setting the default value for both the Username and Password TextBoxes (for testing purposes only that is )

    Gary

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: web application + sessions

    That's how sessions work. Your web server (even the built in one) loads the application but each time you build, the app pool gets recycled (because the DLLs/file are rewritten). The same thing would happen in IIS if you were to redeploy. If you want to keep the user logged in, use cookies (remember me checkbox) so that the login is more persistent.

  7. #7

    Thread Starter
    PowerPoster motil's Avatar
    Join Date
    Apr 2009
    Location
    Tel Aviv, Israel
    Posts
    2,143

    Re: web application + sessions

    It is sooo good to see you back Mendhak!!!
    i really hope you had the time of your life in your vacation
    welcome back :B

    and back to the subject:
    well this one is a real drawback to web applications, its really kill the flow of your work and spends a lot of time, i can't use cookies for this task i need sessions . thanks for the info Gep and Mendhak.
    * Rate It If you Like it

    __________________________________________________________________________________________

    "Programming is like sex: one mistake and you’re providing support for a lifetime."

    Get last SQL insert ID

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: web application + sessions

    \o/ Hello hello! \o/ Korea was actually quite difficult but it was still unique (got a few photos up, more soon).

    Subject - You may want to have a look at Windows Workflow if that's the case. WF has something known as state workflow and persistence service. Even if you don't look at WF, considering that it's a big subject, you could have a think about persistence in general. You've got a workflow and you need to persist user data somehow - store it in the database. So the database can have a few workflow/intermediate tables that store information related to the various steps along the way in it. If the user comes back later, then you can simply read the information out and restore into the form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width