Which query fields are required to populate a User object?

I have written an ASP.net app that needs to obtain a BO user object. It is all working but there is a 30 second delay whilst populating the InfoObject with the results. i think this is due to the fact I am currently using a Select All statement which I probably don’t need to do. This is being run on BO XI 3.1.

I am populating the User (CrystalDecisions.Enterprise.Desktop.User) object using the results from this InfoStore Query:

SELECT *
FROM CI_SYSTEMOBJECTS
WHERE SI_KIND=‘User’
AND SI_NAME=‘UserName’

I then run the query and populate an InfoObjects object with the results:

infoObjectsUser = infoStore.Query(query);

After checking whether anything was returned and that only one record was returned I populate a single InfoObject with the first result before casting to a User object :

InfoObject infoObject = infoObjectsUser[1];

By using logging I have determined that this last line of code takes 30 seconds to run if the code hasn’t been run recently (if we run it again immediately it is almost instant as I assume something remains in memory maybe?).

I am assuming that it could be due to populating the object with every attribute returned in the query and we may be able to increase performance by only returning the fields that are required to build the user object. However I have no idea which fields are required and which are optional.

The only data I need from the User object are the groups they belong to, as well as the ability to be able to write back following any additional groups being added to the User. Which field is the main ID (SI_ID, SI_GUID, SI_CUID, SI_RUID…) ?

Any help with this would be gratefully received.

(I’ve not done much work with BO so may be overlooking something obvious)


rickp101 (BOB member since 2009-04-08)

Rickp101, hopefully you have figured out this issue.

I am trying to, I think, perform something similar.
I need or want to populate some hundred groups in 3.0 with similar accessing privileges. Doing this by opening one group at a time would take longer than I would like.
Therefore, I am trying to search if there is a process or script which I can adopt to perfom this action for me within our XI 3.0 environment.


di652 (BOB member since 2005-02-24)

We too have this problem with 30 seconds delay. Not only in the above mentioned situation with a BO user object, but also in other seemingly innocent parts of the .NET code.

The application is a replacement for the BO login screen. It works OK, but the response time may be 2 seconds, 32 seconds, 62 seconds, or 92 seconds! It’s not easy to predict the response time, but as Rickp101 suggests, two tests within a short time generally tend to give the last test a short response time.

Another topic in this forum possibly mentions the same problem:
https://bobj-board.org/t/136431

Our application uses .NET 2 and BO XI 3.1.

Because of the 30 seconds I suspect the problem to be some kind of a timeout that occurs randomly, but I have no evidence from logs, Event Viewer etc.


Jens (BOB member since 2003-05-05)

We have solved our problem of 30, 60, 90… seconds delay. :smiley:

It’s related to .Net 2.0 and later. It seems that the common language runtime (CLR) tries to verify the Authenticode signature at load time to create Publisher evidence for the assembly. If it does not succeed, it retries this with random intervals.

In our case the server does not have direct access to the internet. So the verifícation always fails with timeout after 30 seconds. But most applications do not need Publisher evidence. And it can be avoided by setting a parameter in the configuration file (generatePublisherEvidence). We did that and the problem disappeared.

Microsoft has this explanation:
http://msdn.microsoft.com/en-us/library/bb629393.aspx

But note that Microsoft claims that the element can be used only in the application configuration file. This is not true in our case. We can only get it to work in the machine.config file.


Jens (BOB member since 2003-05-05)