.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Session expire error

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
 
Hi,I have Store procedure its take some times to execute, While its executing my session expires the browser seems to freeze and the user do not seem to know what to do. Instead, Could i please re-direct to the login page with a red line message saying "Your session has expired. Please login again."whats the best way to do that?krdslakmal


View Complete Post


More Related Resource Links

i make a web site using frame but session is expire Error message is my Config file is attache

  
i make a web site using frame  but session is expire message is Object reference not set to an instance of an object Description: HTTP 500. Error processing request. Stack Trace: System.NullReferenceException: Object reference not set to an instance of an object at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0 at System.Web.UI.Control.LoadRecursive () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessLoad () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessPostData () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.InternalProcessRequest () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0 My Web Config file is<configuration>    <!-- store the database connection info here -->     <appSettings>        <add key="sBook_StoreDBConnectionString" value="Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\Program Files\CodeCharge\Examples\BookStore\BookStore_MSAccess.mdb;Persist Security Info=False" />            </appSettings>  <system.web>  <httpRuntime executionTimeout=&quo

ReportViewer Error Asp.net Session expired

  
When i am connecting Report Manager report through our ASP.NET 2.0 application using Report Viewer control frequently we get message ASP.Net Session expired .              How can we avoid this error.While i directly opens Reports through the Report Manager reports are opening without any problem.   My .Net application Code. ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://SERVER/reportserver");ReportViewer1.ServerReport.ReportPath = @"/myreport/reportname";

Have some error using arraylist in session to store multiple value

  
i have two buttons in user control, button1 is (like) and second is (dLike). if i click any button the count will increased in my database table by 1. our table have id,title,url,imagegalary,articleid. in everypage i take the article id as in sessioni alredy disable the links when you click once , after i went to next page and come back to the same page the button will visible how to solve this problem. how to store the multiple session values in the arraylist and display it . please anybody replay me protected void ImageButton1_Click(object sender, ImageClickEventArgs e){string ArticleID1 = GenerateArticleID();COLTools.DB.DataBaseType = COLTools.DataBaseType.SqlServer;COLTools.DB.ConnectionString = ConfigurationSettings.AppSettings["COLCMS"].ToString();string updateQuery = "update Article set Alike = Alike + 1 where Articleid =" + ArticleID1;COLTools.DB.RunSql(updateQuery);disablebutton();addtovotelist(ArticleID1);likedislike();}protected void ImageButton2_Click(object sender, ImageClickEventArgs e){string ArticleID1 = GenerateArticleID();COLTools.DB.DataBaseType = COLTools.DataBaseType.SqlServer;COLTools.DB.ConnectionString = ConfigurationSettings.AppSettings["COLCMS"].ToString();string updateQuery = "update Article set Dlike = Dlike + 1 where Articleid =" + ArticleID1;COLTools.DB.RunSql(updateQuery);disablebutton();addtovotelist(A

When Session is expire

  
i am using frame in Web Site . but session is expire than Login Page open in within frame how to open Login Page in Seprate Window  and my main frame page is not show

How to catch error in session variable in globals.asax(Application_Error) and redirect to same page

  
Hi, i have a login page where username got to enter his/her username or password. When you try to enter any scripting over there eg:'<asd>' it gives an error  'Server Error in '/' Application' 'A Potentially dangerous Request. Form value was detected from client' I don't want to redirect user to custom error page when such unpredictable error occurs. infact i got a label on the same page itself where error's are displayed. how can i display such errors on this very same label. can i do that using globals Application_Error ?. Session variable not working here. Please give me the exact steps for how i can catch and display the error which are not validated. waiting for reply thanks and regards, Learning Programmer

Weird casting error (storing Generic list in Session)

  

Am trying to store a generic list in Session to act as a simple shopping cart. Am getting a weird casting error when I try and retrieve it from Session.

A critical error has occurred.
[A]System.Collections.Generic.List`1[MyCartItem] cannot be cast to [B]System.Collections.Generic.List`1[MyCartItem].
Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    in the context 'LoadNeither' at location 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.
Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    in the context 'LoadNeither' at location 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.


I have a class variable defined:

List<MyCartItem> _cart;

In the Load event I have:

_cart = (Session["MyCart"] != null) ? (List<MyCartItem>)Session["MyCart"] : new List<MyCartItem>();



Session State throws error in ASP.NET Site Pages for SharePoint 2010 portal using Visual Studio 2010

  

I'm developing Visual Studio 2010 solution for site pages. I’ve created Site Pages in SharePoint 2010 and I’m trying to access Session variables in code behind in ASP.NET but it throws the following error.

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

I set the page directive as enableSessionState=&quo

Session "WSSUSAGESESSION14" failed to start with the following error: 0xC0000022

  

Getting this error in event log. Anyone seen this before?

 


Access is denied error thrown in "Setup Secure Session" activity

  

Hello,
Could someone help me with the following issue, please?

System setup:
- Windows 2008 R2 server hosting both MVC2 web application and WCF service for it;
- users connect to the web application which gets all data from the WCF services;
- WCF services are resused by several other applications (WinForms based) which work fine and have never experienced any security related problems;
- MVC2 uses impersonation (<identity impersonate="true"/>) to connect to WCF services, so we have single security boundary for both web and winforms clients (which are out of scope of the problem);
- both MVC2 web application and WCF services share the same ASP.NET v4.0 DefaultAppPool application pool, running under NetworkService identity;
- all users, user PCs and servers belong to the same AD domain, which is a part of global corporate tree;
- all unhandled exceptions are automatically caught by the web application and forwarded to application developers' e-mail box;
- WCF binding setup in web application:

<wsHttpBinding>
    <binding name="WSHttpBinding_BifrostServices" closeTimeout="00:10:00"
     openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"

Session state error in UserControl when using HttpModule for rewriting

  

Hi,

Really hope that someone can help me out with this problem as I've been banging my head against the wall for the last 5 hours or so.  I've written a URL Rewriting HttpModule for a client and it all works fine in the development environment, but when I upload it to IIS 7 on my server it starts to complain (no surprise there then).  The error that is getting thrown is :

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

It only happens in the IIS 7 and when I use the URL Rewriting (if I go the page directly everything is fine).  I can actually use the Session fine in the actual page but the error is being thrown through a custom control that is being used for the menuheader and it needs to know about the session.  I've tried many things including putting all the enableSessionState directives into the web.config and the page directive and even someone saying that this was a bug in x64 machines and that I had to write a verificationCompatibilty entry into the registry.

The thing I don't understand is why it's not

Session expire on window close

  

Hi,

I need your help badly. I want to expire session when wndow is directly closed. I have master page.

 


Custom error on session expiration

  

Hi,

I have an issue with my asp .net application. I am using custom errors on my pages. So I configured in web.config like,


<customErrors mode="On" defaultRedirect="~/ErrorPage.aspx">

      <error statusCode="403" redirect="~/ErrorPage.aspx"/>

      <error statusCode="404" redirect="ServerError.aspx?errorCode=404"/>

If an internal server error comes, ie, 500 then I have to send an email to the administrator with all the error details with error number.

For this I have created a code in the application_error section of global.asax page. If a 500 error comes it will be send a mail to the admin with details.

But if 403 error came, ie, session expired; it will loop to the application_error and sending mail repeatedly.

In the Error page, I am checking the session variable and if there is no session exists the page will redirect to login page.

How to handle this Problem? Can any one suggest a good solution for this?

Below is the app_error code

void Application_Error(object sender, EventArgs e)

{

Exception exception = Server.GetLastError();

Exception objErr = Server.GetLastErro

Session expire before timeout

  

Hi all,

I set session timeout ="200".

But my session automatically time out within 5 minute.

plz suggest me what i do for fixed session timeout?

 

Thanks

Viky.

 

 


Error :Session state has created a session id, but cannot save it because the response was already f

  

I read the solutioin for this error, at the following link :

http://forums.asp.net/p/1046935/1576341.aspx

but I am still not clear what exactly causes the error. I have two doubts :

1. Can anyone please elaborate a bit on this issue, with any example ????

2. Is there any drawback of this approach ???


Thanks in advance for any reply......



Can a user's session and their security ticket expire at different times?

  

Hi there,

If a user's security ticket and session state are configured to expire after twenty minutes, is it possible that one could go before the other? So for example, a user could have access to a protected web page but their sessions has been lost?

Cheers, WT.


MS SQL Server: Disconnect Users From Database - Kill User Session

  
If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

IsapiModule Error 500 Issue

  

I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:

ISAPI_START

CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"

 
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend