Board index » delphi » Tunneling TCP/IP Protocol and COM

Tunneling TCP/IP Protocol and COM

Hi...
  we are working on putting our COM servers behind firewlls, while keeping
web pages, etc., out where the public can see them.  To do this without
opening all the ports DCOM requires, we've implemented "Tunneling TCP/IP" to
get DCOM to work over just port 80.  It works fine for most calls (despite
the fact that initial discovery and instanciation is quite slow).

  However, we would like to pass the Microsoft DOM (IXMLDOMDocument) as a
parameter to the functions and simply modify the DOM's content in the server
instead of passing and returning WideStrings and re-loading the DOM on each
end.  The problem is that when we call a function that uses the DOM as a
parameter, we get "The RPC server is unavailable".  That's strange to see at
that point, because we have already instanciated our object...we are just
calling a method on it.

  My guess is that the "un-marshalling" (?) of the DOM on the server side
cannot be accomplished.  I recall earlier tests that showed I need to set
the MTS package on the server side to activate as a "Library Package"
instead of "Server Package", but this won't work over Tunneling TCP/IP
because we get "Class not registered".

  (We're using D5, and the MSXML.dll library.  We're using the simple
co-class's .Create function, and we've set up the remote component by
exporting the package from MTS on the server and running the created .exe on
the client.)

  Does anyone know if there's a way to accomplish passing a DOM object
parameter while using Tunneling TCP/IP to accomplish DCOM?  Thanks for any
advice...

-Howard

 

Re:Tunneling TCP/IP Protocol and COM


I would look up this error on MSDN. This is likely a network config issue.
For instance:

http://support.microsoft.com/support/kb/articles/Q228/3/93.ASP

As for your architecture, I would just pass the XML string instead of a DOM
reference. The XML string should be more efficient than passing interface
pointers across the network.

--
have fun
Binh Ly
http://www.techvanguards.com

Quote
"Howard Moon" <hm...@landstar.com> wrote in message news:3b5dbbcc_1@dnews...
> Hi...
>   we are working on putting our COM servers behind firewlls, while keeping
> web pages, etc., out where the public can see them.  To do this without
> opening all the ports DCOM requires, we've implemented "Tunneling TCP/IP"
to
> get DCOM to work over just port 80.  It works fine for most calls (despite
> the fact that initial discovery and instanciation is quite slow).

>   However, we would like to pass the Microsoft DOM (IXMLDOMDocument) as a
> parameter to the functions and simply modify the DOM's content in the
server
> instead of passing and returning WideStrings and re-loading the DOM on
each
> end.  The problem is that when we call a function that uses the DOM as a
> parameter, we get "The RPC server is unavailable".  That's strange to see
at
> that point, because we have already instanciated our object...we are just
> calling a method on it.

>   My guess is that the "un-marshalling" (?) of the DOM on the server side
> cannot be accomplished.  I recall earlier tests that showed I need to set
> the MTS package on the server side to activate as a "Library Package"
> instead of "Server Package", but this won't work over Tunneling TCP/IP
> because we get "Class not registered".

>   (We're using D5, and the MSXML.dll library.  We're using the simple
> co-class's .Create function, and we've set up the remote component by
> exporting the package from MTS on the server and running the created .exe
on
> the client.)

>   Does anyone know if there's a way to accomplish passing a DOM object
> parameter while using Tunneling TCP/IP to accomplish DCOM?  Thanks for any
> advice...

> -Howard

Re:Tunneling TCP/IP Protocol and COM


  Thanks, Binh...yeah, that's what we'll do.  We had thought that passing
the DOM might be more efficient because the server would not have to
instanciate it and load its XML, but we weren't sure.  Thanks again.
-Howard

Re:Tunneling TCP/IP Protocol and COM


This would be true if the DOM.Document can marshal-by-value more efficiently
than transporting the XML string by hand. However, the DOM does not MBV, so
you'll esentially have the receiving end hold a proxy pointer back to the
source end and all calls are marshaled back to the source environment.

--
have fun
Binh Ly
http://www.techvanguards.com

Quote
"Howard Moon" <hm...@landstar.com> wrote in message

news:3b5eaaf6$1_1@dnews...
Quote
> We had thought that passing
> the DOM might be more efficient because the server would not have to
> instanciate it and load its XML, but we weren't sure.  Thanks again.
> -Howard

Other Threads