none
ASP.NET Session has expired, why ?

    Question

  • Hi,

    I have an aspx with report inside, in the ide (VWD) I can see the page and the report with data on it.

    When I deploy the page on the web srv I can see the page but without

    data on the report, instead I see one error inside the report, the error is:

    "ASP.NET Session has expired"

    Exception Details: Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    Maybe ther is something to set in the ObjectDataSource wich I use as

    datasource of the ReportViewer ?

    I don't know any more wath to do, please if somebody had same

    problem, please help me.

    Gioking

     

     

     

     

    Friday, December 16, 2005 11:44 AM

All replies

  • If your webserver name contains "_" you will see this weird error. Try http://IPAddress/AppName.

     

    I had the similar error and this fixed it.

    Tuesday, March 14, 2006 10:56 PM
  • Are you using cookieless sessions?  There is a known bug with the viewer in when ASP.Net is set to use cookieless sessions.
    Wednesday, March 15, 2006 6:34 AM
    Moderator
  • No, I am not using cookieless sessions.
    Wednesday, March 15, 2006 5:40 PM
  • I've had this too and changing the server name to ip address helped too but hey this is a quite critical error , took me about half of day figuring out why it didn't work and was lucky to find this artical , Is this maybe fixed with service pack of something? If not i think microsoft should fix it asap.
    Sunday, February 25, 2007 10:24 AM
  •  Brian Hartman - MSFT wrote:
    Are you using cookieless sessions? There is a known bug with the viewer in when ASP.Net is set to use cookieless sessions.



    Hi Brian , Can you please explain where is this cookieless session configuration ?

    I haven't defined anything like that anywhere but would like to check if it helps , Altough changing the name to ip again worked but Now in another context i'm running into the same problem and would love to solve it once and for all hopefully without changing my computer's name..
    Monday, February 26, 2007 2:32 PM
  • This problem is beacuase animated tag names are too large.
    Friday, March 2, 2007 4:24 PM
  • Hi ,

    We are encountering the same issue in our project.. Could you please explain what animated tag names are and how can we solve this issue.

    Many Thanks.

    Shikha

     

    Wednesday, March 14, 2007 7:06 PM
  • I have also the same trouble.

    For the moment I have corrected this in IIS6 :

    For application pool, in properties, I have put maximum worker processes to 1 (previously I had 2)

    Response time are a little longer but it works....

    Now I try to understand where does come from this problem.

    Monday, March 26, 2007 8:03 PM
  • The problem is most likely that you are using in-proc session state (the default).  When you use in-proc session and have two worker processes, each one has its own independent version of session.  As a result, if a request for the aspx page is routed to one worker process, but the request for the report content goes to the other process, the second request will not find a session and assume it has expired, generated the error you see.  The two ways to work around this are to either use only a single worker process or to use out-of-proc session state, such as SQL Server.  See this article for more details: http://msdn2.microsoft.com/en-us/library/ms178586.aspx
    Monday, March 26, 2007 10:26 PM
    Moderator
  • Thank you very much for your answer. That's exactly our case!

    It's help us a lot

    Tuesday, April 3, 2007 9:57 PM
  • Where do I make the change? IIS or my Code?

     

    Thanks in advance,

    AL

     

    Monday, August 6, 2007 9:50 PM
  • Hi,

     

    I am getting the same error message 'ASP.NET Session has expired' and in my case, the report server is configured in a load balanced mode and I am using a virtual ip to connect.

     

    I believe my issue will get rectified once I implement a sticky session ? can some one tell me how to configure this in a report server ?

     

    Regards,

     

    Dinesh

    Friday, September 28, 2007 1:45 PM
  •  

    Hi Brian,

     

    The problem is most likely that you are using in-proc session state (the default).  When you use in-proc session and have two worker processes, each one has its own independent version of session.  As a result, if a request for the aspx page is routed to one worker process, but the request for the report content goes to the other process, the second request will not find a session and assume it has expired, generated the error you see.  The two ways to work around this are to either use only a single worker process or to use out-of-proc session state, such as SQL Server.  See this article for more details: http://msdn2.microsoft.com/en-us/library/ms178586.aspx

     

     

    We found your answer to the problem, but we have OutProc Session State then also this error is ocurring,

     

    See the below error detail. Please can you help me with below error what could be the problem even after having Out-Process Session state

     

    Error Details :

    ASP.NET session has expired

    Source : Microsoft.ReportViewer.WebForms

    Stack Information : at Microsoft.Reporting.WebForms.ReportDataOperation..ctor() at Microsoft.Reporting.WebForms.HttpHandler.GetHandler() at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Target Site : Void .ctor()

    QueryString Data:
    ----------------------------------
    ReportSession: 4dak3r55ukr1xnakneeuia45 ControlID: 4c5fbe73-d8f7-4ae4-804b-5ea01e147e5c Culture: 1033 UICulture: 1033 ReportStack: 1 OpType: ReportArea Controller: ClientControllerctl00_m_cphAcc_m_rvProgressReportLearner PageNumber: 1 ZoomMode: Percent ZoomPct: 100 ReloadDocMap: true EnableFindNext: False LinkTarget: _top

    Post Data:
    ----------------------------------


    Server Variables Data:
    ----------------------------------
    ALL_HTTP: HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:*/* HTTP_COOKIE:ASP.NET_SessionId=2cedre55dfjnfnubg0ejheeg; Farm=none; frmLogin=875DEA334948A47AE568A75585B08FE8B82FEAD4DBD9BEB7B96FC22506D8ABB7977376A7A3AED611540CF0758592911F7BF8A76F0A185A7BCF6AE9CFA7DB596F0D034AA50C254E0187AF183123436B45950FD 
    Timestamp: 10/2/2007 9:18:21 PM Message: Error Log Description :



    ----------------------------------


    Error Details :

    ASP.NET session has expired

    Source : Microsoft.ReportViewer.WebForms

    Stack Information : at Microsoft.Reporting.WebForms.ReportDataOperation..ctor() at Microsoft.Reporting.WebForms.HttpHandler.GetHandler() at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Target Site : Void .ctor()

    QueryString Data:
    ----------------------------------
    ReportSession: 4dak3r55ukr1xnakneeuia45 ControlID: 4c5fbe73-d8f7-4ae4-804b-5ea01e147e5c Culture: 1033 UICulture: 1033 ReportStack: 1 OpType: ReportArea Controller: ClientControllerctl00_m_cphAcc_m_rvProgressReportLearner PageNumber: 1 ZoomMode: Percent ZoomPct: 100 ReloadDocMap: true EnableFindNext: False LinkTarget: _top

    Post Data:
    ----------------------------------


    Server Variables Data:
    ----------------------------------
    ALL_HTTP: HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:*/* HTTP_COOKIE:ASP.NET_SessionId=2cedre55dfjnfnubg0ejheeg; Farm=none; frmLogin=875DEA334948A47AE568A75585B08FE8B82FEAD4DBD9BEB7B96FC22506D8ABB7977376A7A3AED611540CF0758592911F7BF8A76F0A185A7BCF6AE9CFA7DB596F0D034AA50C254E0187AF183123436B45950FDBF2863805E017258495C195CF25; ASPSESSIONIDSSRDCDDQ=HELGPLJAICFFDEGFFDFABNBP; ASPSESSIONIDCSTDSBSD=PDMEPLJACGONGPPJIENIJAKB; ASPSESSIONIDQQSCDDDR=LPAHMMJALOOOBIOJPOOCECLE HTTP_HOSTStick out tonguele.platoweb.com HTTP_REFERER:http://ple.platoweb.com/Reserved.ReportViewerWebControl.axd?OpType=DocMapReport&ClientController=ClientControllerctl00_m_cphAcc_m_rvProgressReportLearner&ReportUrl=%2fReserved.ReportViewerWebControl.axd%3fReportSession%3d4dak3r55ukr1xnakneeuia45%26ControlID%3d4c5fbe73-d8f7-4ae4-804b-5ea01e147e5c%26Culture%3d1033%26UICulture%3d1033%26ReportStack%3d1%26OpType%3dReportArea%26Controller%3dClientControllerctl00_m_cphAcc_m_rvProgressReportLearner%26PageNumber%3d1%26ZoomMode%3dPercent%26ZoomPct%3d100%26ReloadDocMap%3dtrue%26EnableFindNext%3dFalse%26LinkTarget%3d_top HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
    ALL_RAW: Connection: Keep-Alive Accept: */* Cookie: ASP.NET_SessionId=2cedre55dfjnfnubg0ejheeg; Farm=none; frmLogin=875DEA334948A47AE568A75585B08FE8B82FEAD4DBD9BEB7B96FC22506D8ABB7977376A7A3AED611540CF0758592911F7BF8A76F0A185A7BCF6AE9CFA7DB596F0D034AA50C254E0187AF183123436B45950FDBF2863805E017258495C195CF25; ASPSESSIONIDSSRDCDDQ=HELGPLJAICFFDEGFFDFABNBP; ASPSESSIONIDCSTDSBSD=PDMEPLJACGONGPPJIENIJAKB; ASPSESSIONIDQQSCDDDR=LPAHMMJALOOOBIOJPOOCECLE Host: ple.platoweb.com Referer: http://ple.platoweb.com/Reserved.ReportViewerWebControl.axd?OpType=DocMapReport&ClientController=ClientControllerctl00_m_cphAcc_m_rvProgressReportLearner&ReportUrl=%2fReserved.ReportViewerWebControl.axd%3fReportSession%3d4dak3r55ukr1xnakneeuia45%26ControlID%3d4c5fbe73-d8f7-4ae4-804b-5ea01e147e5c%26Culture%3d1033%26UICulture%3d1033%26ReportStack%3d1%26OpType%3dReportArea%26Controller%3dClientControllerctl00_m_cphAcc_m_rvProgressReportLearner%26PageNumber%3d1%26ZoomMode%3dPercent%26ZoomPct%3d100%26ReloadDocMap%3dtrue%26EnableFindNext%3dFalse%26LinkTarget%3d_top User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
    APPL_MD_PATH: /LM/W3SVC/199092251/Root
    APPL_PHYSICAL_PATH: D:\PLE\PhoenixWeb\
    AUTH_TYPE: Forms
    AUTH_USER: brittanygeyer
    AUTH_PASSWORD:
    LOGON_USER:
    REMOTE_USER: brittanygeyer
    CERT_COOKIE:
    CERT_FLAGS:
    CERT_ISSUER:
    CERT_KEYSIZE:
    CERT_SECRETKEYSIZE:
    CERT_SERIALNUMBER:
    CERT_SERVER_ISSUER:
    CERT_SERVER_SUBJECT:
    CERT_SUBJECT:
    CONTENT_LENGTH: 0
    CONTENT_TYPE:
    GATEWAY_INTERFACE: CGI/1.1
    HTTPS: off
    HTTPS_KEYSIZE:
    HTTPS_SECRETKEYSIZE:
    HTTPS_SERVER_ISSUER:
    HTTPS_SERVER_SUBJECT:
    INSTANCE_ID: 199092251
    INSTANCE_META_PATH: /LM/W3SVC/199092251
    LOCAL_ADDR: 10.250.1.153
    PATH_INFO: /Reserved.ReportViewerWebControl.axd
    PATH_TRANSLATED: D:\PLE\PhoenixWeb\Reserved.ReportViewerWebControl.axd
    QUERY_STRING: ReportSession=4dak3r55ukr1xnakneeuia45&ControlID=4c5fbe73-d8f7-4ae4-804b-5ea01e147e5c&Culture=1033&UICulture=1033&ReportStack=1&OpType=ReportArea&Controller=ClientControllerctl00_m_cphAcc_m_rvProgressReportLearner&PageNumber=1&ZoomMode=Percent&ZoomPct=100&ReloadDocMap=true&EnableFindNext=False&LinkTarget=_top
    REMOTE_ADDR: 205.173.47.254
    REMOTE_HOST: 205.173.47.254
    REMOTE_PORT: 27196
    REQUEST_METHOD: GET
    SCRIPT_NAME: /Reserved.ReportViewerWebControl.axd
    SERVER_NAME: ple.platoweb.com
    SERVER_PORT: 80
    SERVER_PORT_SECURE: 0
    SERVER_PROTOCOL: HTTP/1.0
    SERVER_SOFTWARE: Microsoft-IIS/6.0
    URL: /Reserved.ReportViewerWebControl.axd
    HTTP_CONNECTION: Keep-Alive
    HTTP_ACCEPT: */*
    HTTP_COOKIE: ASP.NET_SessionId=2cedre55dfjnfnubg0ejheeg; Farm=none; frmLogin=875DEA334948A47AE568A75585B08FE8B82FEAD4DBD9BEB7B96FC22506D8ABB7977376A7A3AED611540CF0758592911F7BF8A76F0A185A7BCF6AE9CFA7DB596F0D034AA50C254E0187AF183123436B45950FDBF2863805E017258495C195CF25; ASPSESSIONIDSSRDCDDQ=HELGPLJAICFFDEGFFDFABNBP; ASPSESSIONIDCSTDSBSD=PDMEPLJACGONGPPJIENIJAKB; ASPSESSIONIDQQSCDDDR=LPAHMMJALOOOBIOJPOOCECLE
    HTTP_HOST: ple.platoweb.com
    HTTP_REFERER: http://ple.platoweb.com/Reserved.ReportViewerWebControl.axd?OpType=DocMapReport&ClientController=ClientControllerctl00_m_cphAcc_m_rvProgressReportLearner&ReportUrl=%2fReserved.ReportViewerWebControl.axd%3fReportSession%3d4dak3r55ukr1xnakneeuia45%26ControlID%3d4c5fbe73-d8f7-4ae4-804b-5ea01e147e5c%26Culture%3d1033%26UICulture%3d1033%26ReportStack%3d1%26OpType%3dReportArea%26Controller%3dClientControllerctl00_m_cphAcc_m_rvProgressReportLearner%26PageNumber%3d1%26ZoomMode%3dPercent%26ZoomPct%3d100%26ReloadDocMap%3dtrue%26EnableFindNext%3dFalse%26LinkTarget%3d_top
    HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)




    Category: Error Priority: -1 EventId: 0 Severity: Information Title: Machine: PHXSDWEB07 Application Domain: /LM/W3SVC/199092251/Root-1-128357357731280316 Process Id: 4204 Process Name: c:\windows\system32\inetsrv\w3wp.exe Win32 Thread Id: 4088 Thread Name:  

     

     

     

     


    Tuesday, October 2, 2007 10:54 PM
  • Brian,

     

    Thanks for the info.  I'm in the middle of implementing a SessionStateStoreProvider, and had my state store messed up.  It would be even more helpful if the report viewer control threw an error saying it couldn't find it's session data ("ASP.NET session has expired" doesn't really point the dev in the right direction).

     

    Thanks again,

    Jerry

    Thursday, March 20, 2008 10:29 PM
  •  

    Prathik,

     

    I was wondering if you could solve your problem cause i am having the same issue too. Can u please tell me what did u do to solve it..

     

    Thank you,

     

    Karen

    Tuesday, March 25, 2008 3:11 PM
  • Unfortuntately, the viewer can't tell the difference between these two cases.  It looks in session and doesn't see the object it is expecting.  When the session expires, ASP.Net simply deletes everything, which looks the same as if the object was never there in the first place.

     

    We should be able to clarify the text of the message to indicate that there is more than one way for this to happen.

    Wednesday, March 26, 2008 9:14 PM
    Moderator
  • some thing pops up in the event viewer though. do u wanna take a look at it,,

    Wednesday, March 26, 2008 9:19 PM
  • disabling firewalls helps as well.  zonealarm was preventing the report to display properly....
    Tuesday, June 17, 2008 11:11 AM
  • AsyncRendering = False
    Sandro
    Thursday, August 28, 2008 7:57 PM
  • This is to Brian Hartman's comment. Im having the same problem and this only happens when we deploy to our DMZ but works fine in dev environment on our network. What did you mean by "The two ways to work around this are to either use only a single worker process" . How do you put them in the same worker process. I have an aspx page with the report viewer which displays reports from the reporting server.
    quame
    Wednesday, September 3, 2008 8:06 PM
  • Hi,

    I am having asp.net session expire error on drill down and export in the SSRS report.

    I have already tried asychrendering = true, change in web.config and adding permissions to .axd files in IIS. none of these things work...any other solution plz.

    FYI,  I am using windows server 2008 64 bit, sql server 2008 and IIS 7.0

    Thanks.

    Prajakti
    Monday, August 24, 2009 7:50 AM
  • Hi all,

    In my case, the scenario is like this

    base project .net 1.1 and report viewer is incorporated within the project but run from a different ip.

    in the web config of report project within system.web  added the following

     <sessionState mode="StateServer" cookieless="true" timeout="120" stateNetworkTimeout="30" />

    And the reportviewer was working as expected.


    MSK
    Wednesday, August 26, 2009 11:39 PM
  • Hi All,

    I hope this article will help to fix this issue.

    http://balanagaraj.wordpress.com/2009/09/25/session-has-expired-in-asp-net/


    share the magic
    Saturday, September 26, 2009 6:18 AM
  • I could solve by updating the link in my database... my report used picture and the link to the picture was stored in the database and the picture was stored in the applications webserver.. since we changed the servers and databases I had forgotten to update the link in the database.. once i updated that everything worked fine...

    It was like the reportviewer was trying to find a picture that didnt exist and it couldnt find that domain name either... hence it threw that erro for me ...


    hope this helps.


    Thanks,
    Karen
    Monday, September 28, 2009 7:53 PM
  • Yes, I got rid of this error by changing the below

     cookieless="true" in the session state settings of InProc Mode of the web.config file

    Wednesday, November 10, 2010 1:19 PM
  • I know you made this post ages ago but if there is any chance that you can maybe post or email me the solution to your problem and how you found the work around without having to limit processes to 1 i will really appreciate it!!!! THANK YOU warren-michael@hotmail.com
    Thursday, January 26, 2012 6:59 AM