VB 2010 Express Webbrowser - Staying logged In
Hello Again :);
I made a small app for my work as a VB learning project, incorporating the WebBrowser. Everything works fine. Basically, I login, navigates to different pages etc, etc and do stuff without a problem. But the problem is my company website automatically logs me out automatically after about 15-20 min of idle. I have a feeling this is cookie related, but I have no idea how to prevent this. I have been using a Timer to refresh the browser every 10min and log back in if I was logged out. But this is not ideal. Is there a way around this? Can someone please help?
Thank you in advance for your help.
Re: VB 2010 Express Webbrowser - Staying logged In
Does the same thing happen in IE, Firefox or some other regular web browser? I would think so. Most web sites expire sessions after a period of inactivity because they might otherwise end up with loads of orphan sessions.
Re: VB 2010 Express Webbrowser - Staying logged In
Quote:
Originally Posted by
jmcilhinney
Does the same thing happen in IE, Firefox or some other regular web browser? I would think so. Most web sites expire sessions after a period of inactivity because they might otherwise end up with loads of orphan sessions.
You are right, it happens on other browsers too. Do you recon refreshing the browser now and then is a good idea? Thanks!
Re: VB 2010 Express Webbrowser - Staying logged In
All depends how you implement it. Imagine how annoying it will be to the user if they are in the middle of a task and the browser reloads. Is this website private or... be easier if we can have a look.
Re: VB 2010 Express Webbrowser - Staying logged In
Quote:
Originally Posted by
ident
All depends how you implement it. Imagine how annoying it will be to the user if they are in the middle of a task and the browser reloads. Is this website private or... be easier if we can have a look.
I have been using it for my work and in the middle of doing something it refresh the browser... really annoying big time. I'm afraid this website is private, I don't wont to get in trouble...:cry: What I can say is this site uses lot of javascripts... all though I have no idea if that has anything to do with it.
Re: VB 2010 Express Webbrowser - Staying logged In
As someone who works on a system that does this (logging people out after inactivity) ... it's a security feature. In our web-based app, if someone hasn't refreshed their screen or clicked on a button or a link or typed anything into it for 5 minutes (configurable) then it will do one of three things (all of which is configurable). First option is to do nothing. Typically only those of us doing development on our local systems will use this option. It is NEVER used in a deployed or production environment. Second option is to prompt the user, letting them know that their session has timed out and asks them if they want to refresh their session. If they click yes, it keeps them logged in and refreshes the page. If they click now, it dumps them out of the system. We use this in mid-level environments, testing, QA, other non-production environments. The third option is what is used by our hosting service on all production sites, as well as the recommended setting for all production locations, even client self-hosted. It dumps the user almost all the way out and sends them to the login screen. If they haven't closed their browser and they log back in, it will take them back to the page where they were. If they had closed their browser, then logging back in take them to the home page.
Point is that we do all this to provide security. Presumably your company is doing the same thing. At least they give you 15 minutes... our out of the box configuration gives you 5, but we deal with personal info, financial transactions and a lot of confidential stuff.
Is there a reason you feel like you need to stay continuously logged in? or is it just to simply by pass the process of having to go through the login all over again?
-tg
Re: VB 2010 Express Webbrowser - Staying logged In
Quote:
Originally Posted by
techgnome
Is there a reason you feel like you need to stay continuously logged in? or is it just to simply by pass the process of having to go through the login all over again?-tg
Thanks TG that was informative. I totally understand the reasons. To answer to your question, I have to login to our company website & gather some data to use on a different app. Sometimes it takes longer to work with that data. So when I come back usually the session has expired. It's not that bad now since I made this little app to automate the login process with just one click. Guess I'm lazy :-)
Re: VB 2010 Express Webbrowser - Staying logged In
Have you considered using the httpwebrequest class to login.
Re: VB 2010 Express Webbrowser - Staying logged In
Quote:
Originally Posted by
ident
Have you considered using the httpwebrequest class to login.
Yes I spent hours and failed to login using httpwebrequest. So I decide to use the webbrowser instead.