Options

Running script - Internal server error

KuccinniKuccinni Posts: 9
edited November 25, 2005 7:22AM in ANTS Load
Hi.
I have a big problem here.
Im testing some .NET aplication. There are some webservice method called directly through web pages so I recorded the script while I was working with web application.

Unfortunately my script does not work - I obtained this error:
InternalServerError
6

Item http://localhost/LetterSpace/wfdlist.as ... le%20Input ASP.NET HTML content <html> <head> <title>The viewstate is invalid for this page and might be corrupted.</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style> </head> <body bgcolor="white"> <span><H1>Server Error in '/LetterSpace' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>The viewstate is invalid for this page and might be corrupted.</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br><br> <b> Exception Details: </b>System.Web.HttpException: The viewstate is invalid for this page and might be corrupted.<br><br> <b>Source Error:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code> 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.</code> </td> </tr> </table> <br> <b>Stack Trace:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code><pre> [HttpException (0x80004005): The viewstate is invalid for this page and might be corrupted.] System.Web.UI.Page.LoadPageStateFromPersistenceMedium() System.Web.UI.Page.LoadPageViewState() System.Web.UI.Page.ProcessRequestMain() </pre></code> </td> </tr> </table> <br> <hr width=100% size=1 color=silver> <b>Version Information:</b> Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 </font> </body> </html> <!-- [HttpException]: The viewstate is invalid for this page and might be corrupted. at System.Web.UI.Page.LoadPageStateFromPersistenceMedium() at System.Web.UI.Page.LoadPageViewState() at System.Web.UI.Page.ProcessRequestMain() [HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    There are numersous reasons for viewstate problems, as outlined in our knowledge base. Given the error message, I'd say the most likely culprit is that the pages are out of order. The script should GET the same ASPX page before it posts to the same page, otherwise WebClient.ViewState may be populated with the wrong viewstate.

    The other common problem that I did forget to mention is that this can happen when accessing the default page. If you go to http://localhost, for instance, and the website gets default.aspx for you automatically, this is not reflected in the ANTS Load script and the viewstate for default.aspx is not loaded by ANTS Load because the URL does not end in .aspx. The solution to this problem would be to amend the test script, replacing WebClient.GET("http://localhost") with WebClient.Get("http://localhost/default.aspx").

    Hopefully this helps solve the problem!
  • Options
    Hello.
    Thanx for your fast answer but the problem with http://localhost is not this case because I go directly to the login.aspx page at the beginning.
    Do you have any more hints please?
  • Options
    Hello,

    I don't know. Can you please post the test script?
  • Options
    I made the script once again, but the errors are little different...
    Have a look please:

    Item http://localhost/letterspace/wfdlist.as ... le%20Input ASP.NET HTML content <html> <head> <title>The request failed with HTTP status 403: Access Forbidden.</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style> </head> <body bgcolor="white"> <span><H1>Server Error in '/letterspace' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>The request failed with HTTP status 403: Access Forbidden.</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br><br> <b> Exception Details: </b>System.Net.WebException: The request failed with HTTP status 403: Access Forbidden.<br><br> <b>Source Error:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code> 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.</code> </td> </tr> </table> <br> <b>Stack Trace:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code><pre> [WebException: The request failed with HTTP status 403: Access Forbidden.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1295 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218 PNetTWebServices.Proxy.WorkFlowDB.getList(comGetListReq getListReq) +48 Gmc.Printnet.Web.Controls.DataGridWFPreview.getData(comGetListReq aRequest) +26 Gmc.Printnet.Web.Controls.DataGridWFPreviewBase.Reload() +72 Gmc.Printnet.Web.Controls.DataGridWFPreviewBase.OnLoad(EventArgs e) +174 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Control.LoadRecursive() +98 System.Web.UI.Control.LoadRecursive() +98 System.Web.UI.Page.ProcessRequestMain() +750 </pre></code> </td> </tr> </table> <br> <hr width=100% size=1 color=silver> <b>Version Information:</b> Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032 </font> </body> </html> <!-- [WebException]: The request failed with HTTP status 403: Access Forbidden. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at PNetTWebServices.Proxy.WorkFlowDB.getList(comGetListReq getListReq) at Gmc.Printnet.Web.Controls.DataGridWFPreview.getData(comGetListReq aRequest) at Gmc.Printnet.Web.Controls.DataGridWFPreviewBase.Reload() at Gmc.Printnet.Web.Controls.DataGridWFPreviewBase.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain() [HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->
  • Options
    maybe would be better to communicate via email, don't you think?
    In case of you are not busy ofcourse
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    This was caused by the ANTS Load script recorder not creating the requests in an order that posts consistent state information.

    Please make sure that before you see WebClient.POST, there is a WebClient.Get request preceeding it for the same ASPX page.
This discussion has been closed.