workflowloadingfailed in asp.net

web.config:

<WorkflowRuntime UnloadOnIdle="true">

<Services>

<add type="System.Workflow.Runtime.Hosting.ASPNetThreadingService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add type="System.Workflow.Runtime.Hosting.SqlTimerService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" ConnectionString="Initial Catalog=wwf;Data Source=localhost;uid=sa;pwd=;"/>

<add type="System.Workflow.Runtime.Hosting.SqlStatePersistenceService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" ConnectionString="Initial Catalog=wwf;Data Source=localhost;uid=sa;pwd=;"/>

<add type="System.Workflow.Runtime.Hosting.SqlTrackingService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" ConnectionString="Initial Catalog=wwf;Data Source=localhost;uid=sa;pwd=;" IsTransactional="false" UseDefaultProfile="true" TrackXomlDocument="True"/>

</Services>

</WorkflowRuntime>

In page 1: create a workflow as following

protected void Button1_Click(object sender, EventArgs e)

{

WorkflowRuntime workflowRuntime = WorkflowRequestContext.Current.WorkflowRuntime;

Guid navMapGuid = Guid.NewGuid();

Session["NavMap"] = navMapGuid;

WorkflowInstance workflowInstance = workflowRuntime.StartWorkflow(typeof(WorkflowLibrary1.NavMap), navMapGuid);

Response.Redirect("Page2.aspx");

}

In page 2:

protected void Page_Load(object sender, EventArgs e)

{

if (!Page.IsPostBack)

{

WorkflowRuntime workflowRuntime = WorkflowRequestContext.Current.WorkflowRuntime;

WorkflowInstance wi=workflowRuntime.GetWorkflow((Guid)Session["NavMap"]);

NavMap wf = (NavMap)wi.GetWorkflowDefinition();

this.lblDetails.Text = wf.Name+" "+wf.Lastname;

}

 

Error in line: NavMap wf = (NavMap)wi.GetWorkflowDefinition();

The requested operation could not be performed: WorkflowLoadingFailed.

{"Workflow with id \"f867f622-e1df-4b2c-839a-4d60b174ae22\" not found in state persistence store."}

(PersistenceStore works well with winform application)

 

Help me!!!

Tx



Answer this question

workflowloadingfailed in asp.net

  • David Everett

    the exception also contain an inner exception. all the web persistence samples fail in 1.2 for me.

    james' sample work well in vs2005b2+wwf1 but it doesn't work when i reinstall vs2005ts+wwf.


  • Neuronz

    Kha,

    Does the exception also contain an inner exception   Do all the persistence samples fail in 1.2 for you, or just James' sample

     

    Arjun


  • Sayg?n

    Hi Arjun,

    I can not found in InstanceState table but it is in WorkflowInstance:

    28 E1D99B4F-2E45-461D-83B7-90DF6DEF2D54 0 NULL NULL NULL NULL 1 2005-12-16 04:38:37.877

    I also test with Samples\technologies\hosting\usingpersistenceservices\cs\. It runs well and I found a row in WorkflowInstance but not in InstanceState.

    I wonder if the reason is VS2005 version. In VS2005Beta2+WWFbeta1, i can well run the Jame Conard sample downloaded from windowsworkflow.net (Web Application Example) but now it has the same error "WorkflowloadingFailed" in VS2005TeamSuite+WWFbeta1.2

    Tx


  • Jereme Guenther

    Did you check security Because ASP.NET runs in a different security context did you make sure that the ASPNET user or the apppool identity has sufficient rights to gain access to the sql store

     

    Regards,
    Marcel



  • juffowup

    Kha,

    Did you check the security as Marcel suggested   Also, I'd recommend deleting the old databases and running the SQL scripts again to recreate them, if you haven't done so between Beta1 and Beta1.2. 

    Try subscribing to the WorkflowTerminated event to make sure that your workflow is not terminating for some reason.

     

     


  • May Lee

    hi all,

    I get the error "workflowloadingfailed" in asp.net (visual studio 2005 beta2+wwf beta 1).

    Could you help me

    Tx


  • flash77

    HI Arjun,

    WorkflowInstanceException:

    {"The requested operation could not be performed: WorkflowLoadingFailed."}

    InnerException:

    {"Workflow with id \"960e9260-fbd3-49b2-abd9-ce11d40e20f2\" not found in state persistence store."}

    Tx


  • MYMMB

    Can you also try one of the published ASP.NET workflow samples from http://www.windowsworkflow.net.  Do they work for you

    Regards,
    Paul



  • K.S

    Did you install the SQL Session Persistence of ASP .NET correct

  • Daniel Booth ACITP

    Hi ajrun,

    Can you help me I spend a lot of time to do but table InstanceState has no data.

    Tx


  • Isha

    to Ajrun:

    asp.net security checked and well run.

    to Michael:

    how can you explain "SQL Session Persistence of ASP .NET" more clearly

    Tx


  • Patrick Barnes

    Sure, can you post the exception and stack and describe what you were trying to do

    Thanks,

    Arjun


  • John_Lee

    Tx,

    Can you see the instance in the persistence store (do a select on the InstanceState table)   It might have terminated in between the two asp.net pages.

     

    Arjun


  • workflowloadingfailed in asp.net