why is my session not cleared?

i have a session and this will not clear at all. i'v tried them all, Clear, Remove etc.
Nothing works .. if the browser is closed and then opened again, it will be cleared ofcourse

strange thing is that my code didn't change and worked perfect before. Can there be other settings involved? like IE?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

do this
where you want to clear your session say at the time of use log out, rather than using clear or remove.
Amien90Author Commented:
session is still there
StephanLead Software EngineerCommented:
Is there anything else happening on your webpage? Maybe a Response.Redirect?
You could also try Session.Abandon();

Let me know what else is happening when you remove a Session if the above didn't work.
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Amien90Author Commented:
Abandom also doesn't work ..

my code didnt change .. i also tried old version of my code where i'm sure that the session was cleared. In my old version the session is also not cleared
StephanLead Software EngineerCommented:
Can you provide some more information, like what is your application doing, when do you check your session etc..

There are many scenario's when a Session is not removed, can you put the code inside an separate application and is the problem still there? Maybe you could post that code so we can reproduce the issue
Amien90Author Commented:
why do you say Reponse.Redirect btw?

i do first a Session.Clear,Remove etc.
And then a Reponse.Redirect right after that
StephanLead Software EngineerCommented:
It is possible that when you clear you session and do a redirect, it could not complete the session removal. This also happens with cookies

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Try Session.Clear() or Session.RemoveAll();

Also read below:-

When you abandon a session, the session ID cookie is not removed from the browser of the user. Therefore, as soon as the session has been abandoned, any new requests to the same application will use the same session ID but will have a new session state instance.

Read more about sessions here:-
Amien90Author Commented:
btw .. whats the workaround with session clear and redirect? nestle a redirect in a IF session = nothing, will not be usable i think
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.