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

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

Custom instance store and instance metadata changes

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Windows Application


we are implementing out own instance store. Besides the property InstanceData, the class SaveWorkflowCommand also contains a property called InstanceMetadataChanges. What is instance metadata and in which situations do changes to the instance metadata occur? Do we have to take care about changes in the instance metadata in our custom instance store? Right now we are storing the initial metadata changes when an instance is created, but ignore any further changes since we would probably somehow have to merge the old changes with the new changes. As far as I can see, the "PurchaseProcess" example does not not save any instance metadata. The documentation of SaveWorkflowCommand isn't relly helpful in this case either. Can anyone tell me what instance metadata is and if we have to take care of changes to instance metadata in our custom InstanceStore?



View Complete Post

More Related Resource Links

How to create one instance of COM object that can be accessed from custom fields/workflows

Hi, Ive got a COM-object that is used to perform some actions on another server, and i can use only one instance of it ... But : 1. my custom fields must interact with it for fetching data 2. my custom workflows must interact with it for posting data So the question is : How to create only one instance of COM-object which can be fully accessible from custom fields/workflows ( custom too ) Thanks :)

How would you handle this? Multiple instance of a custom class...


Forgive me if this isn't the appropriate place.

I have the following data.

10484	1	30	0.5011	0.4630	0.5254	0.0081	10.8362
10484	1	30	0.5061	0.4666	0.5363	0.0075	12.2901
10484	1	30	0.5051	0.4688	0.5383	0.0060	12.5718
10484	1	30	0.5064	0.4623	0.5352	0.0074	12.9344
10484	2	30	0.5035	0.4637	0.5371	0.0074	13.1082
10484	2	30	0.5092	0.4726	0.5397	0.0075	11.7046
10484	2	30	0.5051	0.4645	0.5368	0.0060	13.1261
10484	2	30	0.5062	0.4642	0.5392	0.0081	13.2161

 I am using the following class.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CvasAdmin.Classes
  public class invitro
    public class invitroDetail
      // pk of the foxpro Dbf
      public double sampleid;

StopRuntime method and lock on instance on persistence store- How are they related



Does call to StopRuntime method on the Workflow Runtime also releases the lock hold on an instance in persistence store by this runtime.

or the instance is locked for complete duration instanceOwnershipDuration.



How to add custom properties to terms in the SharePoint 2010 managed metadata term store?


There is a "Term.CustomProperties" collection to get the collection of custom property objects for the current Term object from the read-only dictionary.
But where and how to define and set custom properies for terms? This dictionary seems to be read-only by default.

Any help / documentation would be appreciated. / Frank

Best method for creating a site definition containing a custom list instance



I want to create a new site definition which, when provisioned, includes an instance of a custom list. The custom list definition is contained in a feature as part of the site definition project. What's the best method for creating an instance of this custom list?

I can think of a few ways to do it:

- Modify the onet.xml for my site definition to include an instance of the list

- Use feature stapling to enable my custom list defintion feature when a site is provisioned using my new site definition and include a list instance in the feature.

Is there another more suitable method?



Custom Sharepoint 2007 Timer Job - Object Reference Not set to an instance



I am creating a Custom Sharpeoint timer job (in 2007) and i used Andrew Connel's blog and his code to create it. But for some reason I always get this error. I commeted out all my code inside execute method but still its the same. I am deploying my timer using Solution Package installation and activated the Feature.

Here is the error: The Execute method of job definition CustomSPJobDefinition.CustomSPService (ID 88a735f1-bbb7-4fea-932f-690dfc25a212) threw an exception. More information is included below.

Object reference not set to an instance of an object.



Guid targetInstanceId = new Guid("EAC61BD1-0C2A-45F6-9148-3A8BC9C93339"

Why creating instance of custom dll using Assembly.CreateInstance is much slower on 64 bit machine t


In my program I need to load a custom dll which I have generated through my application. When I try to create instance of this custom dll on 64 bit machine following line takes 5 times more than what it takes on 32 bit machine:

oControl = oAssembly.CreateInstance(sDLLFullPath,True)

Can anyone help me understand why this line is slow on 64 bit machine than 32 bit machine. Is there any other way to create instance of my custom dll?


Recognise instance ID of the custom control



I have written a date picker in C# and JavaScript that includes a text field, a calendar image and a datepicker. Datepicker is a div named "bpc1-calendar". It works perfectly. However, my problem is when two or more instances are added to a page. They're all named the same. If only I could find a way to get a unique instance ID of the control, then I can name the second control "bpc2-calendar" and so on.

Does anybody know how to retrieve an instance ID?

Any idea is highly appreciated.


How to get workflow instance in custom activity?


I am using Sequential workflow (.net 3.5). I have created 3 custom activities and dragged these activities in my sequential workflow. The activities are




Each Custom activity will have the following execute method. 

protected override ActivityExecutionSt

Activation error occured while trying to get instance of type Database, key "DBName"


Im using Enterprise library 5.0
I have a scenario, where I have to access two different databases in my application.

Basically this application is a webservice,delployed on my local for testing purpose.
I'm trying to access this web method from diffent windows application, default connection works fine but the other database throw's exception.

Problem is only my defaultDatabase is works fine, if I change defaultDatabase="MYCON1" with "MYCON2" it works fine, if I try to access the other database which is not default, throws exception.

<dataConfiguration defaultDatabase="MYCON1" />
<add name="MYCON1" connectionString="Data Source=server1;Initial Catalog=dbName1;User Id=Username1;Password=password1;"

" />
<add name="MYCON2" connectionString="Data Source=Server2;Initial Catalog=dbName2;User Id=Username2;Password=password2;"
providerName="System.Data.SqlClient" />

Database myDB=EnterpriseLibraryContainer.Current.GetInstance<Database>(); --> works fine for the default database (MYCON1)

Database myDB=EnterpriseLibraryCo

SQL Server Express2008 R2 brings app down, instance problem


I have tried dozens of changes and modifications to many settings as I will outilne here and all to no avail.

The short answer here though is that I uninstalled SQL Sever Express 2008 R2 and went back to the "NON" 2008 R2 and got things working. But like the fool I am wanted to run on the more current rev and updated again, all problems returned....



Win Server 2003 R2 SP2


VWD2008 Express (removed)




XP Sp3

VWD2008 Express

SQL Server Express 2008


I was orginally getting this message after updating to SQL Sever Express 2008 R2, I removed VWD 2008 Express from the web server, no good, then uninstalled SQL Server 2008 Express R2 and reinstalled SQL Server 2008 Express. worked but had issues, couldn't install MGTM Studio. Then I removed SQL 2008, cleaned folders and reg. Reloaded SQL Server 2008 Express, still flaky, couldn't get the Management Studio to install. So I removed it again and used the Web Platform Installer, which worked but loaded 2008 R2 again. Which brought back the message.

Failed to genera

WCF Essentials: Discover Mighty Instance Management Techniques For Developing WCF Apps


Instance management refers to a set of techniques used by Windows Communication Foundation to bind a set of messages to a service instance. This article introduces the concept and shows you why you need instance management.

Juval Lowy

MSDN Magazine June 2006

Error "user does not have permission to perform this operation" with User Instance = True.


I setup SQL Server 2005 / SQL Express. All works fine in SQL Server 2005.

I am connecting to a SQL Database from VS 2005,  Tools/Connect to Database. I set the Data Source to "Microsoft SQL Server Database File (SqlClient)" (meaning SQL Server Express) and User Instance = True, and Integrated Security = True.

The above is working successfully on all machines except my Laptop. On my Laptop, I am getting this error "user does not have permission to perform this operation". On my Laptop, if I change User Instance = False, it works fine. Also, If I connect to SQL Server 2005 it works fine only if User Instance = False.

I tried all kind of security changes, nothing worked. For example, I setup Everyone as Full Control for the Folder and the MDF File of SQL Server. I gave my user ID as sysadmin role in SQL Server Express. Also, I enabled creating User Instance form SQL Server Express, Nothing is working.

Appreciate your help.


"An error occurred while retrieving data from Oracle Instance..."


I have succeffuly Imported the ADF and have also successfully created a Business Data Column. But when I try to query data , I get the following error

An error occurred while retrieving data from Oracle Instance. Administrator, see the server log for more information

And this is what I found in the Application Logs
A Metadata Exception was constructed in App Domain '/LM/W3SVC/81256521/ROOT-1-129217212004078822'. The full exception text is: LobSystem could not be found using criteria 'id=476'.

How to detect and prevent new browser instance


Hi Folks,

I have a problem w/ a web app which is probably fairly common, but I cannot find any solutions anywhere. Hopefully someone will have an idea.

The web app in question provides a UI for editing a client (in the business sense, not the browser sense), identified by a ClientID.  I store the ClientID in Session, which gets passed from page to page, along with a number of other pieces of data in Session.  Works great.

The problem is that if the user opens a new browser window using Ctrl N or File->New Window (in IE), the new window comes up with the same page as the current page, with the same session info. Then if the user navigates to a different client in the 2nd window, the ClientID in session refers to the new client. If they go back to the original browser window and save, the original client gets saved using the 2nd ClientID, and all hell breaks loose, because now the data from the two jobs are intertwined.

I have enabled trace and verified that the new browser window uses the same SessionID as the original.  If an entirely new instance of IE is opened, it has a different SessionID, so is not a problem.  I have not yet investigated other browsers, such as Chrome or Firefox.

Is there any way to determine if a browser instance is opened for a web app which is already open in

Common session for different browser instance


Hello everyone,

I am working on a website which uses a common database shared by another 2-3 websites.  Now i am having a requirement that whenever a user clicks a link provided on another website and comes to my website and if the user is already logged in to my website then my website should not ask him to login again it should by pass the login page and show the next page.

Here the problem is i am not able to get the session objects in newly opened browser window even if the user is already logged in to my website in another browser window. I am not sure but i thing IE uses two different processes for two different browser instance and because of that i am not getting the session objects required.

Deos anyone have some idea on my problem.

Note: I can not ask the another website vendor to pass anything as a querystring.

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