locked
ASP.NET session has expired in WebTest (Web Request contains the ReportViewControl) while playbacks the WebTest

    Question

  • Hi,


    I have used ReportViewerWebControl in a asp web page. executing it in a browser, I can generate my reports without problem.
     

    I tried to create a WebTest using Visual Studio Team Suite for Testers 2008 Beta 2. Recording the test causes no problem, but as soon as I try to run the test again, then I get the following exception

     
    Server Error in '/SampleApplication ' Application..


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

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [AspNetSessionExpiredException: ASP.NET session has expired]
    Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683
    Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553
    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

    VSTS 2008 Beta 2 edition throws the above mentioned error for the following WebRequest

    i dont think there is no mistake  present in the query strings

    http://192.168.1.61:3006/AppConsole/Reserved.ReportViewerWebControl.axd?Mode=true&ReportID=6039e425a6db489f9795bc496b22525f&ControlID=02ddb00e-948e-4ab6-863c-baef2c516e19&Culture=1033&UICulture=1033&ReportStack=1&OpType=ReportArea&Controller=ClientControllerctl00_ContentPlaceHolder1_rptItemPerform&PageNumber=1&ZoomMode=Percent&ZoomPct=100&ReloadDocMap=true&EnableFindNext=False&LinkTarget=_top

    Please give me solution for fix this problem as soon as possible.

    Regards

    Gunaseelan.S
    Saturday, November 24, 2007 6:33 AM

Answers

  • Yes, but if the "dynamic parameter" isn't a value that changes between the original recording and the correlation run (which is done in the background after recording, this is the part that automatically detects the dynamic stuff) then I think it's possible that it wouldn't be caught, but would instead be seen as a valid static parameter.  It sounds like this could have happened to your session id... are you sure that all session/report id parameters used by the report viewer control have been promoted to dynamic parameters, there aren't any of them that were missed and left as hardcoded values?

    Friday, November 30, 2007 1:15 AM
    Moderator

All replies

  •  

    When you record a webtest, immediately following that the engine will run that webtest in the background to find any dynamic parameters in the page that need to be correlated.  With this kind of page it's possible that when the correlation run happened in the background the session id (as it had been recorded) was still valid, so it didn't catch that as a value that needed to be extracted each run. 

     

    I think the easiest way to fix this is to just use the 'Promote Dynamic Variables' button in the web test editor (on the tool bar) and it should catch and fix the error.

     

    Let me know if that doesn't work.

    Monday, November 26, 2007 2:36 PM
    Moderator
  • Thanks for your reply Dennis Stone.

    VSTS 2008 Beta 2 Automatically detects the dynamic parameter when recording has been stopped

    Prompts for Select the dynamic parameters to promote to web test parameters
    with Dynamic Parameter,Extract Parameter from Response and Bind Request.

    ReportURL,ReportID,ControlID are dynamic parameter promoted in Request that contains
    ReportViewerWebControl(.axd) and other prompted values are successfully promoted to web test
    parameters by clicking OK button.

    I have tried with "Promote Dynamic Variables" also as per your comments and it wont work.

    Actual Scenario where this issue noticed in playback as follows
    1.Open the page that contains the Combo box and calendar control,Reportview control - works fine in Playback.
    2.Selects the particular item in combo box in that page - Throws an error mentioned above in playback
    3.Donot select the from and end date value and press Apply button, application generates
    the Barchart for analysis for particular selected item.- Throws an error mentioned above in playback.

    Please help to fix this issue as soon as possible

    Let me know whether is this known issue in VSTS 2008 Beta 2 Version.


    Regards

    Guna.
    Tuesday, November 27, 2007 7:16 AM
  • Yes, but if the "dynamic parameter" isn't a value that changes between the original recording and the correlation run (which is done in the background after recording, this is the part that automatically detects the dynamic stuff) then I think it's possible that it wouldn't be caught, but would instead be seen as a valid static parameter.  It sounds like this could have happened to your session id... are you sure that all session/report id parameters used by the report viewer control have been promoted to dynamic parameters, there aren't any of them that were missed and left as hardcoded values?

    Friday, November 30, 2007 1:15 AM
    Moderator
  • Hi Gunaseelan / Dennis,

        Did you get this fixed by any chance ? what was the solution\workaround for this ? Can you please let me know as soon as possible ?

    -Regards,
    Karthik.

    Thursday, March 18, 2010 6:54 PM
  • Hi,

    Did you get a chance to fix this issue? I am facing the same issue in vs 2010 web test.

    Regards


    Prashantgouda


    • Edited by Prashantgouda Thursday, June 21, 2012 10:14 AM set alert
    Thursday, June 21, 2012 10:13 AM