Re: remoting options
- From: <param@xxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 10:43:40 -0500
What would also have been cool if in VStudio we could right click on a
client project and add a remote object reference just like they have the
option for Web Reference.
thanks
"peter" <apvx95@xxxxxxxxxxxxx> wrote in message
news:42c07360$0$19708$cc9e4d1f@xxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> See comments inline:
>
> param@xxxxxxxxxxxxxxxx wrote:
>> Peter, thanks for the update on soapsuds. A few questions:-
>>
>> 1. Do I need to use soapsuds at all? What if I copied the "server dlls"
>> to the bin directory on the asp.net application? Initially everything
>> will be running on the same box. What is the recommended method?
>
> You need to use soapsuds if you want to configure .NET remoting using
> configuration files. This is the best way of doing it. It means you can
> change lots of stuff without recompiling, like the kind of SAO it is (if
> it is an SAO), and the port the server's listening on (although this won't
> apply if you're using IIS to host the server) and the version of the
> application that you want the server to use.
>
> Copying your remote object class library to anywhere won't do anything for
> you on its own. You have to compile its interface or metadata into your
> client code somehow so that it can be loaded/instantiated on the client.
>
> Somehow or other, you have to configure .NET remoting so that it knows
> what channel you want to register, what protocol it will be using, what
> object you want to call through what proxy, and where that object (the
> real one) is hosted.
>
> If you're going to use config files for this, you need to use a metadata
> proxy, because this allows you to use 'new' in your code. If you use an
> interface or an abstract base class you can't use 'new' because you can't
> instantiate either of these things. For these cases you have to use an
> Activator object, which is much less elegant.
>
> Don't compile the remote object itself into your client code. This is a
> very bad idea from a security point of view, and is also unreliable
> because it simply won't work in many cases - especially if you use CAOs.
>
> I've never used IIS to host a server - because I want to use an
> application server, not a web server. In our architecture, the web server
> sits in a DMZ and is not a part of the corporate domain. It therefore
> cannot make trusted calls to the middle tier. This tier (which is on the
> domain) is called via Windows services running on the application server.
> This also allows us to use a tcp transport which uses a binary formatter
> by default. Of course we could run IIS on the app server, and it would
> make it easier to manage the listening ports (as there'd only be one) -
> but on balance I prefer to use Windows services. After all, the app
> server is invisible to the outside world because it has no external IP
> address. We occasionally check that this is still the case by using tools
> like nmap. We also encrypt traffic, using IPSec.
>
> In an ASP.NET project you need to configure .NET remoting in your
> application_start method in Global.asax, and locate the config file
> somewhere under inetpub so that you can map its path (using
> Server.MapPath(), if I remember correctly).
>
> Since you are using remoting, you have to consider IIS to be (logically)
> two separate instances - web server and app server - even though it's
> physically one instance running on the same machine. You put stuff for
> the remote *server* into IIS's bin folder.
>
> If you are running everything in IIS on a single machine, why are you
> using remoting? Why not just define some objects that you can compile and
> call locally? It's a bad idea from a security point of view, but hey! if
> you're running everything on the web server, it's insecure anyway and
> you've nothing to lose but a bit of complexity.
>
> You can still logically partition your code into tiers, but they won't be
> making remote calls.
>
>> 2. It sounds like what you are outlining is kind of similar to using wsdl
>> for web services?
>
> Well yes. Kind of. soapsuds produces metadata that allows the remote
> object to be called. It will also produce WSDL if you use the correct
> incantation, I seem to recall: but I'm not a Web service expert. I've
> never had a need for one.
>
>> 3. I was planning on hosting the remote object in IIS and using a binary
>> formatter for client serialization. Will using soapsuds revert to the
>> soap serializer?
>>
>
> No problem with that. You'll have to use http, though, if you host your
> object in IIS. It also means you have to have IIS running on your
> application server.
>
> Whether there's much point in using a binary formatter with http, I don't
> know. soapsuds says nothing about the formatter, the transport or
> anything. It just produces metadata: either a DLL or a .cs source file
> for you to compile. The metadata is all that is required for a
> client-side proxy.
>
> You declare the formatter in your configuration of .NET remoting and you
> can use any combination of http/tcp with binary/SOAP formatters. You can
> even define your own formatter (if you must).
>
>> Also, re: security do I have to do anything with CAS on the remote
>> object? I am not that familiar with CAS
>>
>
> No. Just make sure you give your remote object class library a strong
> name. The compiler and the framework will do the rest. This will ensure
> that the .NET framework only loads DLLs originating from a publisher in
> possession of your private key (i.e. you, hopefully!) It protects you
> against stuff like malicious versions of your library being substituted
> for the real one.
>
>> thanks again
>>
>>
> No problem
>
> Cheers
>
> Peter
.
- Follow-Ups:
- Re: remoting options
- From: peter
- Re: remoting options
- References:
- remoting options
- From: param
- RE: remoting options
- From: [MSFT]
- Re: remoting options
- From: param
- Re: remoting options
- From: richlm
- Re: remoting options
- From: param
- Re: remoting options
- From: peter
- Re: remoting options
- From: param
- Re: remoting options
- From: peter
- Re: remoting options
- From: param
- Re: remoting options
- From: peter
- Re: remoting options
- From: param
- Re: remoting options
- From: peter
- Re: remoting options
- From: param
- Re: remoting options
- From: peter
- remoting options
- Prev by Date: RE: Updater Application Block version 2.0, Managing multiple appli
- Next by Date: UIPAB version 2.0 on win2k server
- Previous by thread: Re: remoting options
- Next by thread: Re: remoting options
- Index(es):
Relevant Pages
|
Loading