ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.Redirect to login page if session get expired in ASP.Net<p>Hi <a class="username" rel="micah"> micah</a>,</p> <p>1) It seems your session Get expires. You can set Session timeout by setting in webconfig refer the below link.</p> <p><a class="title f16" href="">What is the Default Session TimeOut in ASP.Net and from where I can change it</a></p> <p>2) If you don&rsquo;t want to use session to maintain user name then you can use cookies or other option if you can implement.</p> <p><a href="">ASP.Net Cookies: Read, Write (Save) and Remove (Delete) Cookies in ASP.Net using C# and VB.Net</a></p> <p>3) But if you are using Session ["userName"] on other page and if it expire then you can check if session is null or not.</p> <p>So you can check on landing page for Session["userName"] null condition if it null redirect to login page so user can relogin if its sesson get expire.</p> <p>4) If you are using other option then also you need to maintain the value for user name like you are doing with session now for Landing Page.</p> <p>If it also expires same error will occur again and again.</p> <p>&nbsp;</p>, 16 Jan 2017 03:06:50 GMT