.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

'Completed' is not an event of 'System.Activities.WorkflowApplication'

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :WPF
Hello,I have a C# code which i have converted into VB.But i am getting compile error in VB code:'Completed' is not an event of 'System.Activities.WorkflowApplication'find below C# and VB code:C#:application.Completed += delegate(WorkflowApplicationCompletedEventArgs e){completedEvent.Set();};VB : AddHandler PickSample.application.Completed, Sub(e As WorkflowApplicationCompletedEventArgs) completedEvent.Set()Can some one provide me solution ?

View Complete Post

More Related Resource Links

Team System: Team Foundation Server Event Service


Use the Team Foundation Server EventService to create and manage event subscriptions or create a Web service to receive and process events.

Brian A. Randell

MSDN Magazine May 2008

SENS: System Event Notification Services and WMI Enable Flexible, Efficient Mobile Network Computing


Networked applications must deal with a host of connection problems ranging from timeouts to congestion to unavailability. If these applications can check the current connection status and, when disconnected, cache transmissions, they become more efficient. Fortunately, both the System Event Notification System (SENS) and Windows Management Instrumentation (WMI) can send notifications to keep applications informed of network status. In this article, the author explains the use of several SENS interfaces, including ISensNetwork and ISensLogon, which trigger events for connects/disconnects and logons/logoffs, respectively. The author then shows how you can subscribe to each of these events, and follows with a discussion of when you might use WMI events instead.

Aspi Havewala

MSDN Magazine August 2002

Custom sequence activity deriving from System.Workflow.Activities.SequenceActivity

Hi, I try to create custom sequence activity. I found some sample (http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/f54e8eb2-29d9-46f6-ad96-766fe6fad333/). But this custom activity looks ugly (to separate nested activity using ellipses instead of arrows). My question is - how to create custom sequence activity, which will look like sequence activity. I also found this sample - <ContentPresenter x:Uid="ContentPresenter_1" Content="{Binding}" Style="{x:Static sacdt:DesignerStylesDictionary.SequenceStyle}"/> When I used this ContentPresenter my custom activity looks like System.Workflow.Activities.SequenceActivity, but I couldn't put on it another activity. I also created class, which derives from System.Workflow.Activities.SequenceActivity, but I couldn't see it in toolbox. My question is - how to create class, which derives from System.Workflow.Activities.SequenceActivity and is visible in toolbox or how to use ContentPresenter for sequence activity, which allows put on itself another activity.

Background worker - errors in completed event

Create a new windows forms project (in using vb.net 2010). Create a button and a background worker on the form. Under the Debug > Exceptions menu, make sure that for 'Common Language Runtime Exceptions' you have 'Thrown' unticked and 'User-unhandled' ticked. Now put the following code in the form's code-behind; Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click BackgroundWorker1.RunWorkerAsync() End Sub Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork Threading.Thread.Sleep(2000) End Sub Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted Dim X As Integer X = 5 / X End Sub End Class Why does it not error nicely? It comes up with no helpful stack trace and just says 'Exception has been thrown by the target of an invocation.'. Place the code to cause the error into the Button_Click event and run it and you will see the difference. Why do we not get these 'nice' errors given that the runworkercompleted event is supposed to be running on the main thread?

System.Runtime.InteropServices.COMException with Event Handlers

hi,           i have written an ItemDeleting Event handler for a document library which holds images. the itemdeleting eventhandler works fine and displays the  errormessage on sharepoint error page when properties.cancel=true and properties.ErrorMessage="This Image is still being used in Announcements. Cannot Delete. ". this works fine when i delete from the doclibrary itself. when i delete the images in the document library from the ImageManger Tool of RadEditor it throws the com exception as follows instead of the sharepoint error page Server Error in '/' Application. -------------------------------------------------------------------------------- This Image is still being used in Announcements. Cannot Delete. 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: System.Runtime.InteropServices.COMException: This Image is still being used in Announcements. Cannot Delete. can anyone suggest, how to reslove this issue.? i have the screenshots,which would better explain but i dont know how to paste images into this forum? kindly let me know how to upload images to this forums also. thank you all

System.ComponentModel.Win32Exception: The operation completed successfully

Hi,      I'm calling a .Net 1.1 Infragistics calender windows control (32 bit) from a html page (old code) in Windows 2008 Server R2 (with WOW64) . This control was working on all operating systems including Windows 7 and when loaded in Windows 2008 Server R2 it throws up the exception given below. I'm able to load the control sometimes, say 5% successful (only the first time when I load the application) and the remaining 95% it throws up the exception dialog box (sometimes it happens when I load the application for the first time too). Not sure whether this is the right forum, if it's not please direct me to the right forum. -------------------------------------------------------------------------------------------------------------------- See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.ComponentModel.Win32Exception: The operation completed successfully    at System.Drawing.BufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)    at System.Drawing.BufferedGraphicsContext.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)    at System.Drawing.BufferedGraphicsContext.AllocBuffer(Graphics targetGraphics, IntPtr target

system wide pulsed event

Can a thread signal an event which is being waited for by a thread running in another process? I have a requirement where multiple processes feed a queue which sends requiests to amazon web services for info on books and offers to sell the book. Currently the request queue is a database table, so any process on the system can place an entry on the queue for the background process to read and send to amazon.  I need a way to signal requesters that the background process has processed a request. ( I am assuming that semaphores and mutexes can only be signaled and waited for within the same process. ) thanks,  

Code in an event handler not working when used with system reflection.

Hi, I am presently writing an application that uses an MDI form with a ToolStrip on it. I have the need to build the menu items dynamically using an XML file. The format of the XML file is as follows: <ContextMenu EventHandlerHost="vFrmPDUsetup"> <!-- These styles will be applied to the menu items. Individual menu item styles can be override by defining as an attibute to the specific menu item, see below --> <Style> <MenuStripBackColour>Transparent</MenuStripBackColour> <BackColour></BackColour> <ForeColour>Chartreuse</ForeColour> <BackImage></BackImage> <!-- Must exist in Images folder --> <FontName>Tahoma</FontName> <FontSize>10</FontSize> <FontStyle>Bold</FontStyle> </Style> <!-- Attributes: Key = Resource Key name in resource file Image = image to display before text, image must exist in Images folder BackImage = background image, image must exist in Images folder BackColour = background colour as colour name ForeColour = foreground colour as colour name FontSize = size of font as value Seperator = add a menu seperator OnClick = click event pointing to the event handler method which must be defined as the MenuItem_ + <attibute value> &

Event ID 7000 - The system cannot find the path specified.


This is a very old prolem that i am getting to. First off I went through anywhere from 4 to 6 or more sessions with a Microsoft TECH and it even escalated a couple of levels of TECH support to boot. I can't remember the details specifically. I do know that I've started with gound up (installed/uninstalled NET Framework versions) installs to where I have all the versions installed. The Service doesn't start either automatically nor manual. I tried the patience of the Support people to fix this last error at that time.

I am starting anew to get the NET Framework Service to work properly . I hope I am in the right support forum.


How to determine whether user initiated an event or the system?



I am going to be writing an application where I need to determine wether it was the user (by clicking on an comboboxitem for example) that initiated an event, or that is was the system(for example the selection of a combobox changes when a specific code executes or something like that) Could someone give me some pointers in the right direction here?

Thanks in advance

.NET Runtime 2.0 Error Reporting event id 5000 system.nullreferenceexception


I only found http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=389835&SiteID=17 regarding this error message and it was of no help to me.

Background: 3rd party program that extracts users from a AD group and manage user creation i a MSSQL 2000 server. Also sends e-mails using the SMTP service. The funny thing is that the program manages everything correctly, but writes an error in the Event log as it exists (below). Job is scheduled with the SQL server agent and runs with a doamin user that has local admin rights. We have the same setup on a testserver where it runs without problems.

Windows server 2003, MDAC 2.8, SQL Server 2000 SP3, .NET framework 2 on both servers.

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date:  2006-08-29
Time:  09:16:28
User:  N/A
Computer: STHPS0125
EventType clr20r3, P1 bzadbatch.exe, P2, P3 44e5c349, P4 bzadbatch, P5, P6 44e5c349, P7 25, P8 308, P9 system.nullreferenceexception, P10 NIL.

For more information, see Help and Support Center at

System.ComponentModel.PropertyChangedEventHandler not handling the event



I'm working in a wpf app that is binding controls to a class that implements INotifyPropertyChanged. I'm trying to track when there are changes to the underlying object by setting a flag whenever a property is changed. To do so, I wired up an event handler to the PropertyChanged event of the class like so:

_facilityLogic.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(facilityLogic_PropertyChanged);


public void facilityLogic_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
Can anyone tell me why this event handler never gets called? The event is firing, but SetIsChanged() never gets called.

ManagementClass, ManagementOperationObserver - Process is not firing Completed Event.

I need to execute a command on Remote box and the task is to wait till the execution finishes and then need to do some other steps. i have written following code using ManagementClass and ManagementOperationObserver  (for Asynchrous execution), it is working fine with win 2003 boxes but when i execute it on 64-bit it is hanging. ALthough my command got executed it is not able to fire the event Completed(observer Delegate). Appreciate any quick help. here goes my code

Class someClass{



bool _wait = false;

void somefunction()

SSL System Impact on Sharepoint BDC, Workflow & Event handler



if SSL  implement on existing  Sharepoint portal .what is the impact of  existing Sharepoint BDC, Workflow &  Event handler ?




Surendra Singh

Event 18210 error - Operating system error 1130 (not enough server storage is available to process t


I tried for the last three days to do a restore over the network or copy the files from one server to another. I kept getting NOT Enough space but there is 500GB free for 49GB file.

OS: Windows Server 2008 64bits

SQL Server 2008 R2 Enterprise 64bits

Restoring using T-sql got the following error:

Msg 3203, Level 16, State 1, Line 1

Read on "\\servername\backup\xxxxx\xxxxx_backup.bak" failed: 1130(Not enough server storage is available to process this command.)

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

Event log as the following:

BackupIoRequest::ReportIoError: read failure on backup device '\\servername\backup\xxxxx\xxxxx_backup.bak'. Operating system error 1130(Not enough server storage is available to process this command.).

I did some research and I found stuff for SQL 7 or windows XP or NT old s

Hidden Workflow Arguments to System.Activities.ActivityBuilder


Hi, I have rehosted the Workflow designer, and the base activity that i load is the Activity Builder(workflowDesigner.Load (activityBuilder);)

I basically need to add in some details to the activity, and the value of which the user should not be able to edit (or may be even see on the designer surface). For this I am (currently) adding some arguments as follows where i can add in the extra information.

activityBuilder.Properties.Add (new DynamicActivityProperty { Name = "HiddenArgument", Type = typeof (string), Value = "Value that the user should not edit." });

But as these arguments are visible on the designer surface in the Arguments Panel on the bottom of the designer, the user can edit this. i also have other arguments that the user is allowed to edit so therefore i cant disable the whole arguments pane.

I would just want to know how can i add my information to the workflow(and obviously save it in the *.XAML file) so that the user cant edit (or see) this information.

EXTRA DETAILS: I basically want something like, if i create a custom activity i can add properties with [Browsable(false)], which causes the user to not see the property on the right side pane but hold a value!

Is it possible to to have a 2 event driven activities in the same state

Hi there,

I am trying to implement a sharepoint state machine workflow that consists of several states, it is designed to handle an infopath form although I am only developing against a 2 column custom list list for now. Besides the obligatory start and end states, I have 3 "waiting for" states, the details aren't important. 

I need to use the delay activity to count down, the end upon which a class variable checked, in this case a date. If the current date is less than the class variable date the state is simply re-entered. the countdown begins again. If the date is greater then a deadline has passed, an email is sent, the class variable is reset to, lets say adddays(2) and the state is again. Pretty standard escalation stuff and completely achievable.

so the state looks like:

                -setState to waitForWhoeverState
                -sendEmail, setDate, setState to waitForWhoeverState

This is fine, but besides send a few emails doesn't actually do anything. So I what I want to do is add another event driven activity in this state which listens for a change in either in the workflow item or a task for example. Again I can get that to work as well. I change something on the form or list. The event fires and something happens. Great!
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