ASP.NET 2.0 at the same time to prevent the same user login
To prevent the same user while landing page should record the information online (in this case the user name), and then determine which are the user login is already exists. Here has been to use a cache store login user name, but there is a problem is to know when the user is away system? This should clear the cache content on a regular basis, and that is to set a cache time. This time can be the user's session with the value of link failure happens when the user session when the value of the user information in the cache will be empty inside. This reached the landing of the effect of preventing the same time, the specific code as follows:
On the landing place of success:
string key = TextBox1.Text; / / user name text box set to cache Keyword
string uer = Convert.ToString (Cache [key]); / / read the corresponding value of the user cache
/ / Determine whether the cache in the user's information, if the value is not relevant, the user does not login
if (uer == null | | uer == String.Empty)
(
/ / Define cache expire time
TimeSpan SessTimeout = new TimeSpan (0, 0, System.Web.HttpContext.Current.Session.Timeout, 0, 0);
/ / Insert the first time a user login related to cache values
HttpContext.Current.Cache.Insert (key, key, null, DateTime.MaxValue, SessTimeout, System.Web.Caching.CacheItemPriority.NotRemovable, null);
Session [”ADMINID”] = TextBox1.Text;
Response.Redirect (”main.aspx”);
)
else
Recommended links:
Cisco Asa 5510 Firewall Basic Configuration
3DS Max 7 Mental Ray Renderer Whole Strategy: Global Illumination
Comment VPN problems can be operational 5 6 words
Fight against PIRACY, legitimate need to do?
Sony To restore dominance: Farewell Idei
Frontpage2000 Jianzhan contrast detail - Relative 98
Norton also talk in the end and more serious incidents of manslaughter
Ministry Of Finance Denied The Procurement Of The Green Dam Said The Ministry Of Industry Is The Onl

Don’t you acknowledge that it is the best time to receive the mortgage loans, which would make you dreams real.
Comment by ADAMSDaisy26 — September 4, 2011 @ 9:46 am
MTS Converter Free can easily convert MTS files to any videos like convert mts files to AVI, convert MTS to MOV, convert MTS TO MP4, convert MTS to DVD, Convert MTS to MPEG, Convert MTS to WMV, etc
Comment by convert mts — September 15, 2011 @ 6:03 am
I’ve desired to post about something similar to this on one of my blogs and this has given me an idea. I’ve really found out a great deal studying this site. Plainly especially excellent content here.
Comment by north face store — October 18, 2011 @ 3:59 pm