This is my first article, so please let me know in case you find something missing or amiss. Feel free to give your suggestions as well as criticisms. I am just another .NET developer next door who enjoys doing his work.
Some of the links that I found useful are listed below:
Using the Code
If you will look into the first link that is shared, you will get a session.warning.zip.You can directly download this file from here. This file became my starting point and I thought that I closed the requirement very easily.
(http://www.cypressnorth.com/downloads/session.warning.zip) I have also copy pasted the code that I got from this file for reference. You just need to include this file in Layout page that is shared so that all the views can easily reference this file. Download the file from the given location. There are four things that are of our interest and the fifth one we are ignoring as of now:
sess_pollInterval - Time you want the page to keep polling and execute the
sess_expirationMinutes - Your application session expiration time
sess_warningMinutes - After what duration you want the pop up to show
- Log Off URL link - Set the Log off URL here
- Some Ajax function - Which we will look at later on
Now this was achieved easily Jquery UI Alert:
Ref attachment for changes in the
I have also kept the old code for reference and in case you want to override the default CSS of jquery UI, then you just need to add the CSS class name to
dialogclass as it's commented there.
Uncomment it and add your class name.
Points of Interest
I hope you enjoyed this tip. In the next part(Part II), I will talk about the new issue that I faced.
Form Authentication timeouts -even when the user has clicked on "Keep Looking" and Ajax methods returning UnAuthorized call failure.