Click here to Skip to main content
15,886,873 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionHow to prevent code refactoring? Pin
He is Cool13-Dec-06 1:54
He is Cool13-Dec-06 1:54 
AnswerRe: How to prevent reverse engineering? Pin
Guffa13-Dec-06 2:19
Guffa13-Dec-06 2:19 
GeneralRe: How to prevent reverse engineering? Pin
karam chandrabose13-Dec-06 5:22
karam chandrabose13-Dec-06 5:22 
GeneralRe: How to prevent reverse engineering? Pin
gnadeem13-Dec-06 10:42
gnadeem13-Dec-06 10:42 
GeneralRe: How to prevent reverse engineering? Pin
Paul Conrad13-Dec-06 11:27
professionalPaul Conrad13-Dec-06 11:27 
AnswerRe: How to prevent code refactoring? Pin
Vasudevan Deepak Kumar13-Dec-06 20:08
Vasudevan Deepak Kumar13-Dec-06 20:08 
QuestionProblem during debug.... Pin
priyank_ldce13-Dec-06 0:58
priyank_ldce13-Dec-06 0:58 
QuestionControlling session time in WinForms app - best approach? [modified] Pin
nzmike12-Dec-06 11:19
nzmike12-Dec-06 11:19 
We have a Vb.Net 2.0 WinForms app that we force our users to log into using their network credentials (via LDAP and ADS). The app allows access to a lot of sensitive information so want to automatically log the user out after a certain time of being inactive (just like you can do on a web form) and then make them log in again to continue - so my question what is the best method in .Net 2.0 for doing this? I looked in System.Security but I can't find anything obvious there and a google didn't turn up anything useful either. I hoped I could test some sort of Form.IsAuthenticated proeprty as in a web app but this does not appear to be the case. (BTW, we don't want to quit the application when a user times out - rather, we'll just set the entire form to be disabled until they log in again.)

Currently what I've done is added a timer to the form and when the user logs in I set the timer's Interval to the number of milliseconds (from the app.config file) that they are allowed to remain logged in when inactive and then call timer.Start(). The problem with this method is reliably resetting the session (by stopping and re-starting the timer) when they do some action (such as clicking a button or entering text etc) - I tried catching Form events such as MouseDown, MouseClick and a few others but if the user clicks a control (eg: a label, textbox, button etc) and not directly on the form's surface itself these events don't get fired which can lead to users getting logged out even when they're using the app... which is clearly not the desired result!

So can anyone tell me the best way to go about doing this using .Net's security model instead of the above method?

TIA for any help/advice...

Mike






-- modified at 17:40 Tuesday 12th December, 2006
AnswerRe: Controlling session time in WinForms app - best approach? Pin
ApurvaShah12-Dec-06 18:52
ApurvaShah12-Dec-06 18:52 
GeneralRe: Controlling session time in WinForms app - best approach? Pin
nzmike12-Dec-06 20:20
nzmike12-Dec-06 20:20 
QuestionFinalize method Pin
rockyl12-Dec-06 3:04
rockyl12-Dec-06 3:04 
AnswerRe: Finalize method Pin
Rob Graham12-Dec-06 3:13
Rob Graham12-Dec-06 3:13 
GeneralRe: Finalize method Pin
rockyl12-Dec-06 3:44
rockyl12-Dec-06 3:44 
GeneralRe: Finalize method Pin
Rob Graham12-Dec-06 7:57
Rob Graham12-Dec-06 7:57 
GeneralRe: Finalize method Pin
rockyl12-Dec-06 17:12
rockyl12-Dec-06 17:12 
GeneralRe: Finalize method Pin
User 58385212-Dec-06 12:03
User 58385212-Dec-06 12:03 
AnswerRe: Finalize method Pin
Guffa13-Dec-06 2:59
Guffa13-Dec-06 2:59 
GeneralRe: Finalize method Pin
Scott Dorman13-Dec-06 3:42
professionalScott Dorman13-Dec-06 3:42 
AnswerRe: Finalize method Pin
Guffa13-Dec-06 3:09
Guffa13-Dec-06 3:09 
GeneralRe: Finalize method Pin
Scott Dorman13-Dec-06 3:45
professionalScott Dorman13-Dec-06 3:45 
GeneralRe: Finalize method Pin
Guffa13-Dec-06 4:01
Guffa13-Dec-06 4:01 
GeneralRe: Finalize method Pin
Scott Dorman13-Dec-06 4:26
professionalScott Dorman13-Dec-06 4:26 
GeneralRe: Finalize method Pin
Guffa13-Dec-06 4:36
Guffa13-Dec-06 4:36 
GeneralRe: Finalize method Pin
karam chandrabose13-Dec-06 5:29
karam chandrabose13-Dec-06 5:29 
AnswerRe: Finalize method Pin
Guffa13-Dec-06 5:56
Guffa13-Dec-06 5:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.