.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

ReloadTrackingProfiles: System.InvalidOperationException: TrackingListener for instance %0 is not in

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :WPF


I am hosting Workflows (dll based) in a web application. I created my own TrackingService and my own TrackingChannel (code below). When starting a workflow, everything works fine, all events are tracked. After re-building my solution, workflows, that were running before, do not track anything anymore (although they continue execution). Info: On every build, the build number of all assemblies is increased by default.

I tried to reload the tracking profiles after loading workflows (using workflow.ReloadTrackingProfiles();), but this leads to the error above. 

What am I doing wrong?




Here is the code for the tracking service:

    public class EnablerWFTracking : TrackingService {


        private TrackingProfile profile;


        #region Constructor

        public EnablerWFTracking()

            : base() {

            profile = this.CreateTrackingProfile();




        #region CreateTrackingProfile


View Complete Post

More Related Resource Links

System.InvalidOperationException: Instance operation is not valid on workflow runtime thread

Am getting the exception related in the title of this article when using the StateMachineWorkflowInstance object to arbitarily set state in my workflow code; and am unsure why.  The code follows below:   500     Protected Overrides Function Execute(ByVal executionContext As System.Workflow.ComponentModel.ActivityExecutionContext) As System.Workflow.ComponentModel.ActivityExecutionStatus   501    502    506         Dim smwi As StateMachineWorkflowInstance = New StateMachineWorkflowInstance(StaticWFRuntime.LocalRuntime, Me.WorkflowInstanceId)   511    512         'set workflow-wide database connection string   513         _connectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString   518    519         Utility.LogEnabled()   520    521         Utility.FoaeaLogger.WriteEntry("Processing TracingApplication.Execute()....", EventLogEntryType.Information)   522         If StaticWFRuntime.LocalRuntime Is Nothing OrElse StaticWFRuntime.LocalRuntime.IsStarted = False Then   523             Utility.FoaeaLogger.WriteEntry("No static RuntimeService object exists!", EventLogEntryType.Warning)   524         End If   525    526         Return MyBase.Execute(executionContext)   527    528     End Function   796     Private Sub gotoState2_ExecuteCode(ByVal sender As System.Object, ByVal e As System.EventArgs)   797    798        

System.InvalidOperationException: Invalid attempt to read when no data is present.


Invalid attempt to read when no data is present.

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.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error: 

Line 53:             if (reader.HasRows)
Line 54:             {
Line 55:                 Response.Write(reader.GetString(0));

Here is my code:

System.NullReferenceException: Object reference not set to an instance of an object

        BVWS.Vardering oWS = new BVWS.Vardering();        BVWS.strucBPVardering oSvar1 = new BVWS.strucBPVardering();        BVWS.StrucPaket oPaket = new BVWS.StrucPaket();                 if (Page.IsPostBack)        {             oSvar1 = oWS.BpVardering("", "", regnummer.Text, "2000", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", DropDownList1.SelectedValue);      tdCHK1.Visible = false;                  try            {                if (oSvar1.rubst01.Length > 0)                {                   

System.InvalidOperationException: Timeout expired.

Hi I am getting the following error on my page:System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at _default.commentCount(Int32 ArtID) at ASP.default_aspx.__DataBind__control4(Object sender, EventArgs e)....I thought I had closed all the connections in my code:Imports System.Data Imports System.Data.SQLClient Partial Class _default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load commentDisplay() End Sub Sub commentDisplay() Dim pageno As Integer = Request.QueryString("page") Dim MyConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("nbb").ConnectionString) Dim MyDataAdapter As SqlDataAdapter MyDataAdapter = New SqlDataAdapter("art_getHomepage", MyConnection) MyDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure

Farm, SPWebApplication.Lookup, System.InvalidOperationException

Dear all,   I have a piece of code that works well on a standalone SharePoint installation:   public void SetPeoplePickerProperty(string webAppUrl) { // elevate permissions to allow setting of property. SPSecurity.RunWithElevatedPrivileges(delegate() { System.Uri srvrUri = new System.Uri(webAppUrl); SPWebApplication webApp = SPWebApplication.Lookup(srvrUri); if (!webApp.PeoplePickerSettings.OnlySearchWithinSiteCollection) { webApp.PeoplePickerSettings.OnlySearchWithinSiteCollection = true; webApp.Update(); } }); }   When I deploy it to a server farm, I get the following error: System.InvalidOperationException: This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint Products and Technologies Configuration Wizard, located on the Start menu in Administrative Tools.   at Microsoft.SharePoint.Administration.SPWebApplication.Lookup(Uri requestUri) The user running the query is farm administrator. It has the necessary access to the configuration database. The server running the code is joined to the farm.   Ideas anyone?   Thanks,   Tore.

System.InvalidOperationException: The 'IBMDA400.DataSource.1' provider is not registered on the lo

I am run the ETL package through the SQL Server Agent, the job fails with the error message "System.InvalidOperationException: The 'IBMDA400.DataSource.1' provider is not registered on the local machine.". But when i run trough the UI is runs fine. I am uisng OLE DB driver to the connect to AS400. can you please tekk ne where a im going wrong.   The  log file entery is as follows    OnProgress,DCMS2100,RBGDC01\SMTSQL_service,LMS_ORDER_HEADER REFRESH,{78FE47C8-9539-4A20-8FC7-BC790204C2F0},{AF7E99E5-653C-4BF5-B5A1-B1E7CE2AEE9E},31/07/2006 19:57:30,31/07/2006 19:57:30,0,0x,ValidatingOnProgress,DCMS2100,RBGDC01\SMTSQL_service,LMS_ORDER_HEADER REFRESH,{78FE47C8-9539-4A20-8FC7-BC790204C2F0},{AF7E99E5-653C-4BF5-B5A1-B1E7CE2AEE9E},31/07/2006 19:57:30,31/07/2006 19:57:30,50,0x,ValidatingOnError,DCMS2100,RBGDC01\SMTSQL_service,LMS_ORDER_HEADER REFRESH,{78FE47C8-9539-4A20-8FC7-BC790204C2F0},{AF7E99E5-653C-4BF5-B5A1-B1E7CE2AEE9E},31/07/2006 19:57:31,31/07/2006 19:57:31,-1073450910,0x,System.InvalidOperationException: The 'IBMDA400.DataSource.1' provider is not registered on the local machine.   at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)   at System.Data.OleDb.OleDbConnectionFactory.Cr

System.NullReferenceException: Object reference not set to an instance of an object.

I am working on a Windows 7 professional machine, 64bit,  to learn SQL server 2008.   i'm working with the microsoft sql server 2008 step by step book and i'm stck on configuring email notificaions. i've already goe through the GUI to configure my email settings. however, sql server agent is disabled. when i try to start the service i get the following error: Unhandled exception has occurred in your application....... Object reference not set to an instance of an object. Here are the details of the error message: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. Server stack trace:    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.FindObjectExplorerFrame()    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.GetObjectExplorer(Boolean activateWindow)    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ShowError(Exception e)    at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Service.Start()    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, In

Word Interop - System.InvalidOperationException in System.Windows.Forms.dll



Microsoft Visual Studio 2005 Version 8.0.50727.42 

Microsoft .NET Framework Version 2.0.50727

Word 2003 Interop


I am trying to recreate the "AmbiguousMember" example from p. 31 of Whitechapel's "MS .NET Development for MS Office" using VB instead of VC#.

This involves implementing an event handler for the Word Quit event. In the event handler, I need to toggle the Enabled state of two buttons. This causes the following error:

A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll

The code behind the Form1 form is shown below. Form1 has two buttons: Button1 "Run Word"; Button2 "Quit Word". The event handler is intended to clean up if the user quits the Word application, and reset the buttons.

A net s

Exception Details: System.NullReferenceException: Object reference not set to an instance of an obje


Hi, i have a Problem, i made a ASP.NET Page with VS2010 and now i want to run it on a iis6 (windows server 2003) and i get the message:

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.


Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]

   Bestellung.Bestellung.ImageButton1_Click(Object sender, ImageClickEventArgs e) in D:\foo.aspx.cs:71

   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115

   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120

   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10

   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13


System.NullReferenceException: Object reference not set to an instance of an object.


I have developed an application with asp.net 2.0 and SQL Server 2005. It is working fine on my local PC without any error and exceptions.

When i moved the application to server, i m getting the following runtime exception.

User needs to login initially to enter application. Once they submit login the following exception occur.

System.NullReferenceException: Object reference not set to an instance of an object.

Here is my error code:

                          Dim dbdata As dataconnection = New dataconnection
Line 54:             Dim dr As SqlDataReader = dbdata.finduser(user_id, user_password)
Line 55:             If dr.HasRows Then   ' error here
Line 56:                 Return True
Line 57:             Else

 Please help me ASAP .  No such exception, when i run on local PC.

System.InvalidOperationException: Internal .Net Framework Data Provider error 12.



I have created an application in which there are few forms. Each form has fields which are linked to a backend table/tables. My application is supposed to be accessed by multiple users concurrently. I ran a test where I created a class file in windows application and i ran a for loop in it to call the url of my application. I wanted to test the effect of firing around 200 queries to my query engine.

The test code is :

namespace MachineGun


static class Program


/// <summary>

/// The main entry point for the application.

/// </summary>


ServerVersion = 'Conn.ServerVersion' threw an exception of type 'System.InvalidOperationException



I have a web service  which tries to connect to the SQL server.

It uses Integrated security = true.

I get the Conn.ServerVersion threw an exception of  type System.InvalidOperationException as soon as the connection object is instatiated.

Any leads.


System.InvalidOperationException: Response is not well-formed XML. ---> System.Xml.XmlException: DTD


Can any one help me out of this.

System.InvalidOperationException: Response is not well-formed XML. ---> System.Xml.XmlException: DTD must be defined before the document root element. Line 2, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res) at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at Microsoft.Web.Services2.Xml.XmlSkipDTDReader.Read() at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at Microsoft.Web.Services2.SoapEnvelope.Load(Stream stream) at Microsoft.Web.Services2.Messaging.SoapPlainFormatter.Microsoft.Web.Services2.Messaging.ISoapFormatter.Deserialize(Stream stream) at Microsoft.Web.Services2.InputStream.GetRawContent() at Microsoft.Web.Services2.InputStream.set_Position(Int64 value) at Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeClient(SoapClientMessage message) at Microsoft.Web.Services2.WebServicesExtension.BeforeDeserialize(SoapMessage message) at Microsoft.Web.Services2.WebServicesE

LOB System did not find instance



I am attempting to write a program to automatically refresh BDC data in a SharePoint List.  I am receiving the following error:

"LOB system did not find instance"

On this line of code:

identifierValues = entity.FindSpecific(objArray, sysint).GetIdentifierValues();

I'm following this post here:  http://old.sharepointnick.com/blog/Lists/Posts/Post.aspx?ID=59

Any help is greatly appreciated.

Thank you,



InvalidOperationException: 'System.Windows.Documents.Hyperlink' is not a Visual or Visual3D


I have a simple TreeView with a template containing a TextBlock with an inline Hyperlink. Whenever I use the keyboard to navigate the tree to this templated item, I get this:


'System.Windows.Documents.Hyperlink' is not a Visual or Visual3D.
   at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
   at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
   at System.Windows.Controls.TreeViewItem.AllowHandleKeyEvent(FocusNavigationDirection direction)
   at System.Windows.Controls.TreeViewItem.HandleDownKey()
   at System.Windows.Controls.TreeViewItem.OnKeyDown(KeyEventArgs e)
   at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
   at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.

help me out......System.InvalidOperationException: RegisterDataItem can only be called during an asy


hiiii i m getting an exception while i m selecting date...

System.InvalidOperationException: RegisterDataItem can only be called during an async postback.

[InvalidOperationException: RegisterDataItem can only be called during an async postback.]
   System.Web.UI.PageRequestManager.RegisterDataItem(Control control, String dataItem, Boolean isJsonSerialized) +521917
   AjaxControlToolkit.PopupControlExtender.Close(String result) in d:\hg\act\Server\AjaxControlToolkit\PopupControl\PopupControlExtender.cs:123
   AjaxControlToolkit.PopupControlExtender.Page_PreRender(Object sender, EventArgs e) in d:\hg\act\Server\AjaxControlToolkit\PopupControl\PopupControlExtender.cs:113
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +8864486
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

asp code
 <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">               
                <br />

System Development Life Cycle

The Systems Development Life Cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved including the waterfall model (the original SDLC method), rapid application development (RAD), joint application development (JAD), the fountain model and the spiral model. Mostly, several models are combined into some sort of hybrid methodology
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