Linno Hak
7/11/2004 5:46:00 AM
Hi,
I'm new to .Net remoting. Hope someone can help to clarify my understanding
regarding creating a client access to a Remote Server object. I've read a
number of
articles on .Net Remoting and I think I understand the principles of how to
design a .Net remoting app. I understand that there are 3 ways for a client
to reference remote objects:
A. Add Reference to the Server object (dll or exe) when both the client and
server components are at the same development site.
B. Derive the Server object from an interface class when the client and
server components are NOT at the same development site.
C. Use SOAPSUDS tool to extract the required metadata from a running Server
object. This is useful when client and server components are developed
at different sites.
I am not sure whether I understand Options B and C correctly or know how to
do options B and C. However my question are:
1. If the Remote Object that my Client app(ASP.Net) wants to
call/instantiate is NOT located on a the same computer that I'm developing
my Client app ,
do I need to map a logical drive to the Computer where the Remote
Object is and then from my Client app I add a reference to the Remote Object
by
browsing the dll or exe on the mapped drive or copy the dll/exe to the
\bin folder of my Client app?.
This is where I'm a bit confused. If the source code/implementation
details of the Remote Object need to be physically located on the Client
machine, how is
.Net Remoting working?. I mean isn't the purpose of .Net Remoting is
where you host one Remote Object on a central Server/Computer where clients
can
instantiate?. Hope my question is clear.
2. I've create a small .Net Remoting application using WebServices to
host one Remote Object and an ASP.Net client. I use Global.asax
(Application_Start)
and Web.config of the ASP.Net client to tell it to use the remote
object. I also use Global.asax of the WebServices to register the remote
object with the
remoting system. When I test the ASP.Net to add a few records to the
SQL database, it works as expected.
Since all my projects are in one solution and on the same computer,
my question is how do I know that my ASP.Net client is actually using the
Remote
Object hosted by the WebServices?. I also tried to use the ASP.net
client from a different computer but had to copy the dll of the remote
object to this other
computer so I can use its properties and methods. I can remotely add
records to the database successfully even when I disable the remoting
configurations
in Web.config file of the ASP.Net client. Because of this I don't
think my .Net Remoting is not working. I'm confused!.
Hope you can understand my questions.