Problems using Secure.dll

Greetings all,

I'm having some trouble with the Secure.dll file, specifically with the Secure class, on an iMIS 15.1.x installation, using iBO.Net.

On my local machine, I'm able to instantiate an object of the Secure class, encrypt/decrypt data without any problems, etc. However, when I move the code out to my production environment (it's on an intranet), I keep getting a null reference error in the Secure.cs file, which I'm guessing is the name of the .cs file compiled to make the DLL. Specifically, I'm getting the following:


[NullReferenceException: Object reference not set to an instance of an object.]
Asi.iBO.CCrypto.InitKeys() +397
Asi.iBO.CCrypto..ctor() +139
Secure..ctor() in c:\Builds\iMIS\15.1.3_Commit\Sources\imis.net\Packages\iWC\Security\Secure.cs:25

Now, here's the odd part. When I run the code that generates this error after a reboot of the server, it works fine...for a time. But eventually it will fail. I haven't figured out the threshold at which it fails, and I know that that the data it's failing on will decrypt after a reboot, but eventually start failing. If I had to guess, I'd say that some resource is getting locked up somewhere...but I have NO idea what resource this thing is looking for.

If anyone has any idea as to what might be going on, I'd greatly appreciate a little guidance.

Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Check your datasources

Since InitKeys() queries the iMIS database, I'd suggest having a look into the ODBC DSN setup.  Internally, iBO has to read two strings from System_Params so it can encrypt and hash data using the organization's secret keys.  If that datasource is nonexistent, inaccessible (registry permissions), or set up in the wrong place (64-bit vs. 32-bit ODBC Administrator), it will fail to connect entirely.  If it is simply not releasing connections (see ODBC settings) then it could be using up all the available connection slots.

--
Bruce Wilson
Director, Technical Services
RSM McGladrey, Inc.