|
Could you please elaborate on how can i check for session expiration.
I used to check for session.IsNewSession on each page.
But even that couldn't help,
hence would like to know how can i implement session expiration in every page.
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
Your login should be stored in the session. You don't need to write some code to expire the session in every page, just set the value you check to null, when someone logs out.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Check the session variable is not null in page load of each pages.If null redirect to login page.It will avoid you to perform operations.
|
|
|
|
|
Vishnu Nath wrote: Could you please elaborate on how can i check for session expiration.
I used to check for session.IsNewSession on each page.
if(Session["UserID"] != null)
{
}
else
{
Response.Redirect("Login.aspx");
}
|
|
|
|
|
Abhijit Jana wrote: if(Session["UserID"] != null)
{
//Do Operation
}
else
{
Response.Redirect("Login.aspx");
}
This is only valid if a session for that variable was created and you are checking for its value.
But if someone requests this page directly, it will throw an error stating
Object refrence not set.
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
|
Buy a really basic book and read it. The code is CHECKING if the value is null.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanx for your suggestion and advice,
will surely do the same.
I have implemented my own logic on it.
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
What logic u applied.Beacuse back button take page from cache.so it take old session value.
so to avoid this wat u did?
I also want to know
|
|
|
|
|
U r right.
And to stop a user accessing a page even after logout, i simply disabled the browsers back button after logout through javascript.
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
U means u disable ur back button in ur whole project.
|
|
|
|
|
What was the Wrong with CG's Answer ?
|
|
|
|
|
No he wasn't wrong.
I had a bit concern, if a user tries to access the page directly, without following the normal routine, then the session variable which i would be checking on my page, would never have existed.
Hence i put out a check over there nd followed with the rest of the suggestions provided by all of u.
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
cgs ans not wrong but if we hav secure page in our site. user can view secure information
|
|
|
|
|
Make all the session variables null before logout.
modified on Thursday, October 8, 2009 4:04 AM
|
|
|
|
|
Thanks for everyone's active participation in helping me.
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
Hi friends,
I've a vb source code for a dll. now i want change something on the Dll.
Though i edit and registerthat component it's not wokring fine.How can fix the pblm.
Cheers,
Mahesh
|
|
|
|
|
You need source code for that to make changes.
ksss_maheshece wrote: Though i edit and registerthat component
Is that a COM dll? You don't need to register .NET DLL's.
|
|
|
|
|
i have the source code.
i'm using that component in my applicatiASP on.
here i register my component in component liberary.Before it's working fine .now i want to change the dll.
Shalln't need to register once again?
can i know why? and how?
Thanks,
Mahesh
|
|
|
|
|
You seem to be pretty damn clueless. If you change a COM object, make sure you register the changed version. Simple really.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I've Edit the Dll source file and registered as well.But it doesn't reflect in the application.What would be the problem?
for Examble,
I have the connection string in my dll.I'd change the server and Database name.but it didn't reflect.Still remains in the same connection.
Thanks,
Mahesh
|
|
|
|
|
Have you unregistered the previous one before you register new one? COM is mess and you will run into DLL hell issues.
|
|
|
|
|
Add a message box or other marker to prove that your new code is what is being run.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I tried my level best but it doesn't reflect that changes.
Thanks,
Mahesh
|
|
|
|
|
hi,
you need to open that source code ,after making changes set it binary compatible then create dll and then add this to your another project as reference.
Cheers,
Praveen.
|
|
|
|