.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WindowsApplication executing two WorkflowApplication instances within one transaction

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :Windows Application


Let's assume we would like to have a WindowsApplication which should be executing two WorkflowApplication instances within one transaction.


We could imagine a button click event handler which should:

  1. Start the transaction.
  2. Execute WorkflowApplication1.
  3. Execute WorkflowApplication2.
  4. Commit the transaction.

Should I just create a TransactionScope and somehow pass it to the WorkflowApplications? If yes, how to pass the TransactionScope to the WorkflowApplications, must this be done explicitly or is it done implicitly?



Best regards,

Henrik Dahl


View Complete Post

More Related Resource Links

Loading persisted workflow instances with WorkflowApplication


I understand I may be doing this wrong.  I read the topic at http://social.msdn.microsoft.com/Forums/en-CA/wfprerelease/thread/a11eb75d-65de-4787-9745-2fd634d0eee9 but I still don't get it, exactly.

I have an application that uses WorkflowApplications to handle the workflows.  I have a workflow that contains a one minute Delay activity.  When this activity is hit, the workflow Idles, persists (SqlWorkflowDataStore), and unloads.  This is all fine.  If the app runs for the minute, it will be resumed and will complete.

However, if I stop the app during the minute that it is delayed, and then start it up again at some point later, the workflows do not resume.  A little digging shows that WorkflowApplication does not resume automatically, and that I have to do that manually.  That's fine.  The problem is, I don't know how.

I see there is a WorkflowApplication.LoadRunnableInstance, and I see in the db that there are records in the RunnableInstancesTable table.  But when I call LRI, I get back this:

System.Runtime.DurableInstancing.InstancePersistenceCommandException was unhandled
  Message=In order to match and load a runnable instance in the store, the requesting InstanceOwner must have specified a workflow host type when it was created. To do so, add a key-value pair to the CreateWorkflowOwner

SQL Server Database Transaction

A transaction is a group of SQL commands executed together as a single component of work to be accomplished. If all of these commands succeed, then a transaction is committed - the changes to the data are made final. If any of the commands within a transaction fail, then the entire transaction is cancelled, or in SQL Server terms, the transaction will be rolled back.

Transactions are one of the things that keep your data safe, but they're not necessarily easy to understand. Here's some help:

Multiple Instances of User Control


I have a user control that I place on a page severl times.  When I make a selection on a ddl in one one control the SelectedIndexChanged event fires for all the control on the page for that ddl.  So I get duplication of an insert that I do.  Is there a way to make sure these events are isolated so this doesn't happen.


Multiple web methods in one transaction


Hi everyone

Sorry I am kinda new in web services, so it may sound a bit newbish question.

We have a web service that comunicates with the database and exposes web methods that enables the application to access the database. Each method does only one operation (Insert, Update or Delete). What I need to do is create a transaction that will be consisted of multiple calls to the database, meaning multiple calls of more then one web methods. Can I do that? (I read that if the web method does not throw exception - or ContextUtil.SetAbort() is not called - the transaction will be commited automatically when the web method finishes executing, which I don't want to happen because I want to call another web method in the same transaction, and then manually commit the transaction)

Thank you in advance.

On page loading or executing all CSS flags are ignored and website is plain without formatting


 My problem is whenever i execute my app the first page that loads is the login page pointed to by my web.config file forms authentication, this page is meant to show CSS formatting for the info i am displaying but it is not. Any help with this problem would be great. A cut and paste of my problem is shown below as you can see there is no CSS.

jsfdnjldfngjfg here it is

Account Login
User Id:
Forgot Password?

I have inserted all the link as in:




Foundations: WCF Transaction Propagation


Web Services: Capturing and Analyzing Client Transaction Metrics for .NET-Based Web Services


This article presents a general-purpose client quality reporting mechanism that can be used in any .NET-based transaction system that employs HTTP/SOAP. The design uses client response time and quality recording, upload of logs as SOAP headers attached to new transaction requests, and server handoff of these headers to a low priority queue for logging and analysis. This technique gives an enterprise near real-time information on actual end-user response times. These response times reflect network delays, client application overhead and server delays. By using this technique, enterprises can avoid the need to develop custom software to mine HTTP logs.

Brian Connolly

MSDN Magazine July 2004

How to run multiple instances of workflow



I've created simple sequential workflow. It's only creates one task and is waiting in while loop until task is Approved. It works fine when I run only one instance of this workflow, but if I start another instance before first one is finished it gets stack and doesn't complete task an workflow stays in In Progress state forever.

Item cannot be found.(rsItemNotFound) when executing a report from a sharepoint Website

I have managed to integrate Report server with Sharepoint .
I created a report with it's data connection with microsoft Visual Studio 2005 , tested it , than deployed it to the specified document libraries in sharepoint.
Everything works fine till now.But when i try to execute the report from the document library in sharepoint the Message :
  • The item 'Reports/Report1.rdl' cannot be found. (rsItemNotFound) '. Even though the report1.rdl is inside the website and is returned when i do the search. Regards.

  • Using the BDC API how to catch the returned code when executing a stored procedure?

    using BDC API, how can i catch the return code a stored procedure returns?

    I tried Entity.Execute to execute a generic method. However, it returns an empty Entity table.

    I know you can do it by setting up an output variable. I prefer returning an integer for tracking errors.

    Any ideas?



    Executing Command Logic in a View Model

    Through the use of the Windows Presentation Foundation's (WPF) advanced data-binding capabilities, the logical structure of a user interface can relatively easily be disconnected from its presentation. Bindable components can now contain nearly all of an application's user interface logic and in most circumstances, replace the need for controller objects from the classic Model-View-Controller (MVC) pattern. So it's no wonder that a new pattern for UI design has appeared

    Video: SharePoint 2010: Executing Code in the Sandbox

    Find out how the Sandboxed Solutions Service provides for a complete isolation system that ensures code running in a sandboxed solution cannot reach out to access information beyond the scope of the deployment. (Length: 12:01)

    Case statement is never executing


    Can some please advise as to why the case statement is never running


    Imports Microsoft.VisualBasic
    Imports AjaxControlToolkit
    Public Class MultilevelAccordion
        Inherits System.Web.UI.UserControl
        Implements System.Web.UI.ITemplate
        Dim templateType As AccordionItemType
        Sub New(ByVal type As AccordionItemType)
            templateType = type
        End Sub
        Sub New()
        End Sub
        Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) _
              Implements System.Web.UI.ITemplate.InstantiateIn
            Dim ph As New PlaceHolder()
            Select Case (templateType)
                Case AccordionItemType.Header
                    Dim myLabel As Label = New Label()
                    myLabel.ID = "HeaderLabel"
                    AddHandler ph.DataBinding, New EventHandler(AddressOf Item_DataBinding)
                Case AccordionItemType.Content
                    AddHandler ph.DataBinding, New EventHandler(AddressOf Item_DataBinding)
            End Select
        End Sub
        Shared Sub Item_DataBinding(ByVal sender As Object, ByVal e As AccordionItemEventArgs)
            Dim ph As PlaceHolder = CType(sender, PlaceHolder)
            Dim headerValue As String = _

    Error Executing CLR Stored Procedure "Item has already been added. Key in dictionary"

    Hello, I'm consuming a web service through assemblies in a Sql Server 2005 database. The client was made with VB.net 2005. Everything was fine in the deploy phase but once I compile the assembly generated in my sql server database and try to execute the CLR stored procedure defined in the assembly it crashes throwing the following error: Error: There was an error generating the XML document. Inner Exception: Item has already been added. Key in dictionary: 'SqlCifin.InfoComercial.ParametrosConsultaDTO' Key being added: 'SqlCifin.InfoComercial.ParametrosConsultaDTO' Where SqlCifin is the name of the assembly, InfoComercial is the web reference namespace and ParametrosConsultaDTO is a complex type defined in the WSDL to encapsulate the request parameters. I tried almost everything but nothing seems to work: Already checked the enviroment variables and . I would appreciate any help you can provide me.  PD: I'm using WSE 3.0. Thanks, Andres Diab.

    Trouble executing ASP.NET app on 64-bit server

    Hi,I have an asp.net webapp that uses some unmanaged code and 3rd party pre-compiled libraries that I am pretty sure are 32-bit.  We developed this on a 32-bit machine with a 32-bit development windows server.  Now we are moving our web site to production where the box has Windows Server 2003 64-bit.  I was getting W3SCV errors about the framework at first:http://s18.photobucket.com/albums/b116/dtdono0/DOTNET/ISAPI_002.jpg I followed the instructions on this blog that talks about enabling the 32-bit version of ASP.NET: http://support.microsoft.com/kb/894435Now I get a new error and I cannot find any documentation on it.  http://s18.photobucket.com/albums/b116/dtdono0/DOTNET/ISAPI_001.jpgI looked up the error code 0x000000c1 and got the following:C:\Err>err 000000c1# for hex 0xc1 / decimal 193 :  SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION                       bugcodes.h  SQL_193_severity_15                                           sql_err# The object or column name starting with '%.*ls' is too# long. The maximum length is %d characters.  ERROR_BAD_EXE_FORMAT                                          winerror.h# %1 is not a valid Win32 application.# 3 matches found for "000000c1"This really doesn't tell me much.  Any ideas?

    Error on executing VB file : The assembly does not allow partially trusted callers

    Dear All ! Though there are many posts stated with solutions, im still facing the error in my application. I have created a VB Class Library project in VS 2008 which on execution in another application (ERP) will open a VB form holding a report. Its working fine in Server machine. The report is drawn from a DB placed on another server. Everything works fine in Server. But in another machine its not.  I did opened the project from the local machine, Build it so tht the dll be caught in the ERP application and so it did, iam able to see the dll within the application. but on execution its throwing the error 'The Call to member failed. The assembly does not allow partially trusted callers ' What should i do in order to execute the project in all local machines application ??   Thanks in Advance... waiting for a solution.. Radhai.  

    SSIS Package Transaction locks entire table

    Hello, I have SSIS package that using transactions and working as expected. But this locks all the tables involved in the data flow that are get inserted/loaded. If I query those tables during package execution the query waits till SSIS releases the lock. But I can still query those tables using NOLOCK hint. Is this possible SSIS will lock only the rows that it insert/update/delete etc? So that other user can still use that table or another instance of same SSIS Package can load data into those tables? My Package: In the package level I have TransactionOption = Required. The Sequence (Data Flow is inside this sequence) TransactionOption = Supported. I had some issue in my package that I posted here: http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/dfb5a8b9-d43c-452b-bb21-d6aea192fc97 and also resolved. Now I descovered this issue and trying to resolve. Thanks, Prabhat
    ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
    Sql Server  SharePoint  Silverlight  Others  All   

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend