Open may only be called on a primary login

I'm getting an error when I try to open a new SmartObjectClientServer() object. The string I pass into the SCConnectionStringBuilder object (that in turn passes the initialization string into the SmartObjectClientServer ctor) looks like this (I added some extra decorations to see if they'd help):




I'm 90% sure that the issue I'm having is one of security, but I'm not exactly sure why - i'm logged in under the same security setting used to run the service...

On a possibly similar note, could someone point me to a document that talks about roles and security?


20 replies

I could be barking up the wrong tree, but would your domain be 'litwareinc' and not as it doesn't require the FQDN?

I looked at our settings and we dont specify the FQDN.


other than that, I can't see much wrong



 im also getting the same error. what is the solution for this.


4Use SHIFT+ENTER to open the menu (new window).
Task Assigned Open Failed : Open may only be called on a primary login 7/13/2009 6:31:44 PM


Murugan K.

Hi All,

I have not come across this problem before but you may want to check the following:

- Run K2 in console mode, set the log level to Debug or All and then see if the user being authorosed matches that which you expect the connection to use incase you have some credential delegation issues?

- Be explicit in your connection string




I am also getting the error for a K2 Client Install with the Server on a separate machine in the same domain.  It appeared to have something to do with domain security since I did not get an option to select the Active Directory User Manager during the installation, however, I have been unable to fix the error.  I have also raised a ticket for it, but no one has provided a solution.  Were you able to find a solution for the error? If so could you please post it in a reply?



Aarthi B.

What's the full connection string you are using? Can you also add the code snippet you use to open the connection?


My Connection string that I set up through the Environment Change Server option is:


The interesting thing is that it works fine when I am connecting to the Workflow server and Smart object Server and Workflow Management Server.  It is only when trying to access the User Browser objects that I get the error.

 Thanks in Advance



Might be an issue with the Domain Info entered. Just a check:

  • Is the server is joined to a domain?

  • Is the K2 service account a valid domain user (not a local user)?

  • Are there any relevant errors in the K2 logs when this error occurs?

  • Are there any entries in the ADUMError.txt file in the Host Serverin directory?



The server is on a domain, and the K2 Service Account is on the same domain.

I can't see any errors in any of the K2 logs on the server, or client for that matter.  More disturbingly, I don't find a ADUMError.txt file anywhere.  I don't have an ADUM.config file either.  Could this be something that is missing?  Am I meant to create this file somehow?  I do have a SQLUM.config file, however I don't want to use SQLUM.





Hi Aarthi

I’m also having the exact same problem “Open Failed: Open may only be called on a primary login” when I try to access the User Browser Objects (using a K2 client install with the server on a separate machine in the same domain). The connection string is similar to yours.

Where you able to find a solution for this?

Thank you,


Its actually a good sign if there's no ADUMError.txt, the file is only created when there's an error. At this point I can think of anything else, can you perhaps post the code you use so I can try it on my end?


I was recently given the solution from the K2 Support team.  In my Documents And Settings/All Users/ApplicationData/SourceCode folder on the client (XP SP2 for us) there is a ConfigurationManager.config file.  In this file I had a setting called UserBrowserServer whose value should be the connection string.  It had not been configured and still showed as "[K2HostConnectionString]" when I opened the config file.  Once I changed the value to my connection string, I restarted Visual studio.  Once I reset the Change Server on the Environment, I was able to access the Users and Roles objects on the User Browser without getting any errors.

I hope this solution works for you too.




Thanks for your reply. I forgot to mention that I’m using version 4.5 of Blackpearl. I couldn’t find a ConfigurationManager.config file anywhere in my machine (I have the previous version of Blackpearl on a virtual machine and was able to find it there, so I’m guessing this changed between versions)

So, does anyone know what would be the equivalent of ConfigurationManager.config file in BP 4.5? The only config file I found that contains the setting “UserBrowserServer” is in file Product.config, but none of the attributes (which are many) contain the actual ConnectionString to my server; is this the right file to modify?

Any help would be really appreciated,

Thank you,



I had raised a support ticket for this issue on our environment.  When it was closed off, the final response was as below:


It looks like with the introduction of K2 4.5 the file location has moved to ’Documents & SettingsAll UsersApplication DataSourceCode’. The file also seems to be located in different locations depending on the operating system K2 is installed on. 

The reason we were looking for this file is that we have reason to believe that there is an entry in this file that is not updated correctly when being installed on an XP machine. The entry we are looking for would normally look like: 

<add key="UserBrowserServer" value="Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;Host=blackpearl;Port=5555" />

 But seems to remain like this:

 <add key="UserBrowserServer" value="[K2HOSTCONNECTIONSTRING]" />


I hope this helps.


Thanks for info. I still can’t find this file, so I’m submitting a support ticket for this issue.

Best regards,


Same situation here... tried the recommendations in the previous post.  Still no go.  I am doing this on v4.5 and both XP and Win7.  This is getting painful.

I found the Configurationmanager.config in the C:ProgramDataSourceCode. I didn't find it in the first place because this folder is hidden. Maybe try a search including all hidden folders and files. After updating the UserBrowerServer with the proper connection string, mine one does work properly.

Great tip. Found it in C:Documents and SettingsAll UsersApplication DataSourceCode, which was hidden. Thanks

Thank you so much for posting this solution. We have a similar environment.. I have a client install and server (database & app) and received the same error attempting to view users/groups/roles.

I found the param, made the update, closed and re-opened Visual studio and now users/groups/roles are visible!


Thank you. config changed worked.

On Vista, Windows 7 & Server 2008 R2, ConfigurationManager.config file is located in a hidden folder at C:ProgramDataSourceCode

Some background on ProgramData folder:
The All Users profile has been renamed Public to better describe its purpose. The contents of certain subfolders within this profile, such as Desktop, merge with the user’s own profile when the user logs on to the computer, just as the All Users profile did in Windows XP. As with All Users in Windows XP the Public profile in Windows Vista has no per-user registry hive because the operating system never loads the profile. In addition, application data previously stored in the All Users profile in Windows XP is now stored in the hidden %SystemDrive%ProgramData folder in Windows Vista.