Posts

Showing posts from 2014

Use this Script to logout and redirect to login page if user is idle for 5minutes.

Use this Script to logout and redirect to login page if user is idle for 5minutes. Keep this script code inside scripting tags. var CurrentTime = 0; var TimeOut_Time = 300; var refreshIntervalId = setInterval(function () { CurrentTime = CurrentTime + 1; if (CurrentTime == TimeOut_Time) { location.href = '@Url.Content("~/Admin/Logout")'; clearInterval(refreshIntervalId); } }, 1000); $(document).mousemove(function (event) { CurrentTime = 0; }); $(document).keydown(function (event) { CurrentTime = 0; }); If anyone has more better way of achieving this functionality, please share.

WCF Security

Image
Windows Communication Foundation (WCF) is a secure, reliable, and scalable messaging platform for the .NET Framework 3.0. With WCF, SOAP messages can be transmitted over a variety of supported protocols including IPC (named pipes), TCP, HTTP and MSMQ. Like any distributed messaging platform, you must establish security policies for protecting messages and for authenticating and authorizing calls. This article will discuss how WCF accomplishes this. A consistent set of fundamental security concepts apply in any distributed messaging system. Consider a message from sender (the calling application) to receiver (the target service receiving the message for processing): ·          Authentication . We typically think about authentication as identifying the message sender. Mutual authentication involves authenticating both the sender and the message receiver, to prevent possible man-in-the-middle attacks. ·      ...