Our solution to much the same problem was to create multiple appdomains, and
then each appdomain can create its own proxy, allowing me different
transports/servers etc per appdomain.  In my scenario I will have a limited
amount of appdomains, and the resources taken to crate them is not really an
issue, might differ from your scenario.

JC Oberholzer

Visit us at www.sdt.co.za



-----Original Message-----
From: Prasad [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 02, 2003 10:25 PM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] Regarding .Net Remoting Proxy

Hello all,

  I have a question on Net Remoting Proxy for which I couldnot find any
answer. Within an app-domian, Can there be more than one proxy reference
to the same Interface a server is exposing?? I am using SingleCall SAO,
TCP-binary formatting. The remote 'Interface' is shared between client and
server in a seperate assembly. Also, I am using a Custom encryption sink
and authentication sink for this Remoting application.  My Client
application is a ASP .NET webapp. This is what I am doing in the Client
application:

RemotingConfiguration.Configure(ConfigFile);

NetRemoteServiceRef = (RemoteIface)Activator.GetObject (typeof
(RemoteIface),remoteURL);

If I call this again,

NetRemoteServiceRef_1 =   (RemoteIface)Activator.GetObject (typeof
(RemoteIface),remoteURL);

I check to see if NetRemoteServiceRef_1 is null and it is not null or
undefined. It is  '_TCP_proxy' when I used debugger to see what it is.
This second reference cannot be used to make a remote call. If I use
it ..I will get an exception 'Object reference is not set'. Why is this
happening???

I tested to see what the client side proxy does on each call to remoting
server using the 'NetStat' at DOSCommand prompt and found this..

'For call to the Remote function, there are TCP connections established
and closed immediately after the call returned from the server (after
around 5 seconds)'.

Because the client side proxy is opening the seperate TCP connection for
each call to the server, .Net Remoting architecture is not allowing me
to create a second Proxy in the same App-Domian. Is the TRUE??? Is so, can
there be only one proxy to any Remoting-Server with-in an App-Domian at
any time???

My Client is Multi-threaded (actually ASP .NET web-app) and I want many
threads have to access the call Remoting-Server simultaneously.  Can I
have one Remote proxy for each thread or share a proxy for all the
clients. If there can be only one proxy  to the Remoting Server can I make
it static and use it in all my Remoting-Client threads??

This is my undestanding on this issue:  I think, eventhough many clients
use the same remote reference ( proxy) to call Remoting-Server, each call
will have its own TCP connection, so

the calls will not be sequential on the Client-side because of using a
Static RemoteReference (proxy).  I made my application and it works well.
I did loadtesting and my client app ran for 150 simultaneous
threads..calling the remote functionality.. I am concerned if there is a
potential problems (Scalaiblity, single point of failure, bottleneck etc)
with using one Static reference (proxy) to a Remoting Server. To my
knowledge it shouldn't be a problem. But I would like to know more
information on this .Net Remoting Infrastructure proxy.

Any help on this issue is greatly appreciated...

Thanks in advance,
prasad.

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
Some .NET courses you may be interested in:

Guerrilla ASP.NET, 10 Nov 2003 in London and 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnet

Guerrilla .NET, 8 Dec 2003, in Los Angeles
http://www.develop.com/courses/gdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

The views expressed in this e-mail are, unless otherwise stated, those of the author 
and not of SDT or its management. The information is confidential and is intended 
solely for the addressee. All reasonable steps are taken to ensure the accuracy, 
integrity and confidentiality of information. No liability or responsibility is 
accepted if information is corrupted or does not reach its intended destination. This 
email message has been scanned for viruses and cleared.

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Guerrilla ASP.NET, 10 Nov 2003 in London and 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnet

Guerrilla .NET, 8 Dec 2003, in Los Angeles
http://www.develop.com/courses/gdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to