locked
Web performance test failed while playing back with error "Invalid JWT token. The token is expired." RRS feed

  • Question


  • Server Error in '/ESS' Application.


    recorded a web test using fiddler and expoted as visual studio web test . It executed fine for one day. Later it is failed with the below  error. This is a office 365- share point site. Please help us how to fix this. Thanks.

    Invalid JWT token. The token is expired.

    Description:
    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.

    Exception Details:
    Microsoft.IdentityModel.Tokens.SecurityTokenExpiredException: Invalid JWT
    token. The token is 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:
    [SecurityTokenExpiredException: Invalid JWT token. The token is expired.]
       Microsoft.IdentityModel.S2S.Tokens.JsonWebSecurityTokenHandler.ValidateLifetime(JsonWebSecurityToken token) +348
       Microsoft.IdentityModel.S2S.Tokens.JsonWebSecurityTokenHandler.ValidateTokenCore(SecurityToken token, Boolean isActorToken) +138
       CCH.Cloud.ESS.AppWeb.TokenHelper.ReadAndValidateContextToken(String contextTokenString, String appHostName) +567
       CCH.Cloud.ESS.AppWeb.SharePointAcsSerializableContextProvider.CreateSharePointContext(Uri spHostUrl, Uri spAppWebUrl, String spLanguage, String spClientTag, String spProductNumber, HttpRequestBase httpRequest) +234
       CCH.Cloud.ESS.AppWeb.SharePointContextProvider.CreateSharePointContext(HttpRequestBase httpRequest) +1251
       CCH.Cloud.ESS.AppWeb.SharePointContextProvider.GetSharePointContext(HttpContextBase httpContext) +499
       CCH.Cloud.ESS.AppWeb.SharePointContextProvider.CheckRedirectionStatus(HttpContextBase httpContext, Uri& redirectUrl) +240
       CCH.Cloud.ESS.AppWeb.SharePointContextProvider.CheckRedirectionStatus(HttpContext httpContext, Uri& redirectUrl) +101
       CCH.Cloud.ESS.AppWeb.Default.Page_PreInit(Object sender, EventArgs e) +98
       System.Web.UI.Page.PerformPreInit() +49
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1844
    




    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
    Version:4.0.30319.34212

    Saturday, November 8, 2014 8:14 PM

Answers

All replies

  • Classical sympton of dynamic data that has not been handled. The website returned a value in an early response and expects that value to be passed in many later requests in the whole transaction. Some hours later the web site has issued a different value.

    One thing to try is to record a new copy of the web test from the beginning up to and including the request that failed. The two should be as nearly identical as possible. Then compare the ".webtest" files to see which values change.

    Regards

    Adrian

    • Marked as answer by Amanda Zhu Friday, November 14, 2014 9:15 AM
    Saturday, November 8, 2014 9:55 PM
  • suppose if it has different /same values. How could I handle  those?

    This script is login to theoffice 365 share point web site.

    Thanks,

    Monday, November 10, 2014 4:47 AM
  • You need to add an extraction rule.

    There are many articles published on this. You can refer

    http://msdn.microsoft.com/en-us/library/ff460245.aspx

    http://msdn.microsoft.com/en-us/library/ee317494(v=vs.110).aspx#AddExtraction

    http://msdn.microsoft.com/en-us/library/ff356199(v=vs.110).aspx

    Visual Studio 2013 has better support for handling Sharepoint app, you might want to explore the new features and check the sharepoint option is enabled.

    • Marked as answer by Amanda Zhu Friday, November 14, 2014 9:15 AM
    Tuesday, November 11, 2014 6:42 AM