Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6126025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:19:10+00:00 2026-05-23T16:19:10+00:00

I am working on an ASP .net project. I have 2 pages. In the

  • 0

I am working on an ASP .net project. I have 2 pages. In the first page i have the following code which creates a new workflow

           var connStr = @"Data Source=M-PC\SQLEXPRESS;Initial Catalog=sella;Integrated Security=True;Pooling=False";
        AutoResetEvent syncEvent = new AutoResetEvent(false);
        var store = new SqlWorkflowInstanceStore(connStr);
        var app = new WorkflowApplication(new Activity1() { str = 4 });
        app.InstanceStore = store;

        app.Idle = delegate(WorkflowApplicationIdleEventArgs o)
        {

            syncEvent.Set();
        };

        app.Unloaded = (workflowApplicationEventArgs) =>
        {
            syncEvent.Set();
        };

        app.Run();
        syncEvent.WaitOne();

        string text = TextBox3.Text;
        app.ResumeBookmark("readText", text);
        syncEvent.WaitOne();
        app.Unload();
        syncEvent.WaitOne();
        Response.Redirect("WebForm1.aspx");

Then in the next page WebForm1 i am trying to reload the same workflow from the instance store in order to resume another bookmark with the following code.

          var connStr = @"Data Source=M-PC\SQLEXPRESS;Initial Catalog=sella;Integrated Security=True;Pooling=False";
        AutoResetEvent syncEvent = new AutoResetEvent(false);
        var store = new SqlWorkflowInstanceStore(connStr);
        var app = new WorkflowApplication(new Activity1());
        app.InstanceStore = store;

        app.Idle = delegate(WorkflowApplicationIdleEventArgs o)
        {

            syncEvent.Set();
        };
        app.Completed = delegate(WorkflowApplicationCompletedEventArgs o)
        {
            syncEvent.Set();
        };

        id = new Guid(TextBox2.Text.ToString());
        app.Load(id);
        syncEvent.WaitOne();
        app.Run();
        syncEvent.WaitOne();

        string text = TextBox1.Text;
        app.ResumeBookmark("readText1", text);
        syncEvent.WaitOne();

But when i execute the workflow nothing happens. Does anyone have any ideas how to approach it? Thx for your time

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:19:11+00:00Added an answer on May 23, 2026 at 4:19 pm

    It looks like you’ll be blocking on the first WaitOne as once loaded the workflow won;t go idle until started

    Does the workflow run if you remove the first wait?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an asp .net net project which calls a workflow service.
I'm working on my first ever ASP.Net project, and I seem to have been
I am currently working on an ASP.net c# project. I have an aspx page
In my asp .net C# project I have a page defualt.aspx on which I
background:Me and my coworkers are working on asp.net mvc project ... we have a
I'm working on asp.net (vb, maybe that can change something) I have a project
I'm working on an ASP.NET MVC project which uses the MarkdownDeep Editor to add
I am relatively new to asp.net environment. Recently working on a project, i discovered
I am working on a web application project in ASP.Net and I have two
I am working with two different web sites in asp.net. In the first project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.