UNSOLVED

hitch2

updated

17 years ago

H

hitch2

16 Posts

0

4176

August 30th, 2009 19:00

XAM/.Net - unable to connect from a web application

I have my centera access code (using XAM) in a separate library, and am able to access/read/write with the Centera using a console application.

I'm now trying to hook this same library in to a web application and make it work. I initially was receiving the "VIM not found" error, but resolved that by adding a to the windows PATH. I'm now receiving the following error:

System.Exception: XAMException caught initialising Centera  class. Message: Exception of type 'XAMSDK.XAMException' was thrown. XamMessage:  xam/authentication failed

The unusual thing is that this exception is thrown almost instantaneously, when normall any operations with the Centera take a number of seconds (due to network latency etc.), therefore I suspect that for some reason it is not actually even trying to authenticate.

I'm using the following connection string:

snia-xam://centera_vim!123.123.123.123?C:\\peafile.pea

and have checked that the application has read access to this file at the point in code where the CreateXSystem() method is called.

I'm using the following code:

            _xlib = XAMLibrary.Instance
            _xlib.LogLevel = Constants.LOG_ALL
            _xlib.LogPath = "sdk.log"

            _xsys = _xlib.CreateXSystem(connectInfo)

The exception is thrown on the last line.

I'm at a bit of a loss as to why this wouldn't work from the web app, but the exact same code will work from a console app. Any tips appreciated!

Note: when running the shXAM java tool, with the pea file and centera_vim.dll in the same directory, I also get the message "xam/authentication failed"