why redirect to Login page over again even though session is still valid?

Posted on 2005-05-12
Last Modified: 2010-04-06

I have web application which is ruing fine.
After login and redirect to default.aspx page, I could do the regular nevigation.
However, onece I rebuild default.aspx page and tried to do the same nevigation to other page,
it redirected me to login page over and over again.

So I logined in again and I could be the same nevigation with new default.aspx page.
Wheverver I changed the default.aspx page, I had to login again and again.
I tested with Visual debug mode to try to trace. Code wise, nothing I could catch during the debug rather than redirect me to login page. It supported to go to next.aspx page but login.aspx page.

I only successed very first time after build default.aspx page. After I rebuild default.aspx, I should relogin. I don't know why.

Question by:young_nacs
    LVL 13

    Expert Comment

    Do you have session cookies activated in your browser?
    LVL 2

    Expert Comment

    When you rebuild the application, the application gets restarted i.e. every setting / session varible will be lost. It is becoming a fresh start again. I think that's why you have to login in again after you rebuild the page. If I am not wrong, there is nothing we can do about it and in the production environment, we do not rebuild the application, so whoever logged in should be logged in until they log out. I hope that answer your question.
    LVL 4

    Accepted Solution

    What beeel said. One of the up-sides of .NET is that it produces compiled code, which (in theory) runs faster. The down-side is, your application is reset every time you change something. This won't be a problem once you launch the site - it's just a pain while you're developing.
    LVL 2

    Expert Comment

    Fuzzyfish1000, thanks for clearifying what I am trying to say. Yes, I agree with you.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now