StartWorkflow() function - ss.RunWorkflow(wi.InstanceId) - Error

hello,

I am getting error in Controlling ASPNETWFPageFlow projrect which i download from samples.

The default page working fine, When I click the Start button, I get error. NullException

It is ocuring in the Module.cs --> StartWorkflow() --> ss.RunWorkflow(wi.InstanceId)

please help me

vijil

bangalore



Answer this question

StartWorkflow() function - ss.RunWorkflow(wi.InstanceId) - Error

  • M.D.A

    You need to register a persistence service with the runtime. WF ships the SqlWorkflowPersistenceService as one option that you can use. To use this service you must first create a sql database and then run the SqlPersistenceService_schema.sql and SqlPersistenceService_logic.sql scripts in that database (you mention that you're on beta2 - I don't remember exactly where the install path was on beta 2 but these scripts are in the install path for WF). This creates the db objects that the SqlWorkflowPersistenceService needs to run.

    To register it with the WF runtime open your web project's web.config and add the following line to the Services section:

    <add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" ConnectionString="[Connection String to your database]"/>

    Again, as you're on beta2 the PublicKeyToken may not be correct as this is for our July CTP (which I highly recommend that you upgrade to: http://msdn.microsoft.com/windowsvista/downloads/products/getthebeta/default.aspx ). If the type string above gives you trouble look in the GAC for the System.Workflow.Runtime assembly and use the info from there.

    Joel West

    MSFTE - SDE in WF runtime and hosting

    This posting is provided "AS IS" with no warranties, and confers no rights


  • WV John

    Dear Karthik,

    I am using Beta2. And Vs2005. The Os is Xp pro. please send ur Emailid to my EmailID, just I mention below.

    vijil

    vijil.jones@craftsilicon.com

    Bangalore.


  • Whoisit

    Hi vijil,

    I am also trying to run the same sample.I can run the application successfully till page4.But after that i am also getting the error in module.cs in line no.175.The error is given below.

    Server Error in '/ASPNETWFPageFlow' Application.

  • LeoXue

    Hi Vijil,

    I have sent you a mail.Kindly send me a reply if you get any answer for the error regarding the pageflow sample.

    Regards,

    Karthick.


  • StartWorkflow() function - ss.RunWorkflow(wi.InstanceId) - Error