by , Blog, No Comments

Sep 21

Running RDS object call results in Internet Server Error


by JR Data, Blog, Comments Off

Sep 21

Have been struggling all day with an error, and finally solved the problem!

When you try to access Visual Basic 6 COM objects with RDS.Dataspace proxy,
you get the following error reported by IIS: Internet Server Error.

Not very descriptive error message, and me and my collegue spent 8 hours tracking
this error down…

Looking at the IIS logfiles, you only see a 500 error code (Internal Server Error):

2011-09-20 14:22:52 W3SVC1418426546 GET 
/msadc/msadcs.dll/ComObject.Class.IsAlive - 80 - Mozilla/4.0+
500 0 193

Trying to invoke a COM object locally works fine with the following code:

Set obj = CreateObject("ComObject.Class")
ret = obj.IsAlive() 

Trying to invoke COM object via RDS, throws “Internet Server Error”:

Set proxy = Server.CreateObject("RDS.DataSpace")
Set obj = proxy.CreateObject("ComObject.Class", "http://localhost")
ret = obj.IsAlive()

I tried to access the MSADC dll directly (http://<site>/msadc/msadcs.dll) with
the browser to see what happened, and got this error message:

%1 not a valid win32 application

That got me thinking. I tried the same url on an working machine, and there
was the same response:

Content-Type: application/x-varg Content-Length: 6 W€

So, something was clearly up with a 32-bit vs a 64-bit dll or program.
After some brainstorming we came up with the following:

The problem was simple enough due to running Windows Server 2003 x64, there is two
catalogs where MSADC could be pointed, one under C:\Program Files\Common Files\System\msadc
and another under C:\Program Files (x86)\Common Files\System\msadc. As we run IIS in
32 bit mode, we had to setup MSADC with the 32-bit dll. That solved the problem.

Tags: , , ,

    Comments are closed.