[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Remoting interfaces on local machine

adheyworth

6/24/2004 1:25:00 PM

Hi,

I have an ASP.Net client that uses remoting (HTTP in IIS) to connect
to the server using only the interface of the required objects (as per
Ingo Rammer examples). So the actual implementation assembly is not
known on the client side.

What I was wondering is if it is also possible to create the objects
locally when the client and server are on the same machine without
creating another virtual directory on the client that points to the
(now local) objects?

many thanks in advance

Andy
7 Answers

Sunny

6/24/2004 3:02:00 PM

0

Hi,
if I understand you correctly, you want to reuse the same assembly. Then
you can try with Assembly.LoadFrom, and CreateInstance.

Sunny

In article <1d79e86c.0406240525.61b3b829@posting.google.com>,
adheyworth@hotmail.com says...
> Hi,
>
> I have an ASP.Net client that uses remoting (HTTP in IIS) to connect
> to the server using only the interface of the required objects (as per
> Ingo Rammer examples). So the actual implementation assembly is not
> known on the client side.
>
> What I was wondering is if it is also possible to create the objects
> locally when the client and server are on the same machine without
> creating another virtual directory on the client that points to the
> (now local) objects?
>
> many thanks in advance
>
> Andy
>

Allen Anderson

6/24/2004 3:15:00 PM

0

that depends, if the object dll is local then just include it as a
reference and you can use it at will. However, if you want to consume
that dll from remoting, remember you still need a host app for it of
some kind (whether a regular app or iis) so the dll will have to be
local to whatever is hosting the remoting object.

Allen Anderson
http://www.glacialcomp...
mailto: allen@put my website url here.com

On 24 Jun 2004 06:25:11 -0700, adheyworth@hotmail.com (Andy) wrote:

>Hi,
>
>I have an ASP.Net client that uses remoting (HTTP in IIS) to connect
>to the server using only the interface of the required objects (as per
>Ingo Rammer examples). So the actual implementation assembly is not
>known on the client side.
>
>What I was wondering is if it is also possible to create the objects
>locally when the client and server are on the same machine without
>creating another virtual directory on the client that points to the
>(now local) objects?
>
>many thanks in advance
>
>Andy

adheyworth

6/25/2004 2:28:00 PM

0

Thanks for your replies.

I saw a Microsoft example but tehy used "new" on the object and the
remoting infrastructure took care of that if the object was local or
remote. Using interfaces you need direct access to the dll if you want
to do a new on the object locally. I did not want to add a reference
as that does not make sense if the dll is renmote on another machine.

My solution is to add the dll to the bin directroy during installation
(no direct reference from another dll on the client) which ASP.NET
always loads automaticaly and do a CreatInstance on the object. Does
this make sense?

I just really like using the interface method for the remote objects
as it is very secure but I do not want the virtual directory on the
same machine when all code is installed on the same server. I think
this is the best method I have seen so far.

If anyone has other thoughts, please let me know.

cheers

Andy

Allen Anderson <allen@sparkysystems.com> wrote in message news:<rsrld0d6nk8c0adephpe90e4r58544is4n@4ax.com>...
> that depends, if the object dll is local then just include it as a
> reference and you can use it at will. However, if you want to consume
> that dll from remoting, remember you still need a host app for it of
> some kind (whether a regular app or iis) so the dll will have to be
> local to whatever is hosting the remoting object.
>
> Allen Anderson
> http://www.glacialcomp...
> mailto: allen@put my website url here.com
>
> On 24 Jun 2004 06:25:11 -0700, adheyworth@hotmail.com (Andy) wrote:
>
> >Hi,
> >
> >I have an ASP.Net client that uses remoting (HTTP in IIS) to connect
> >to the server using only the interface of the required objects (as per
> >Ingo Rammer examples). So the actual implementation assembly is not
> >known on the client side.
> >
> >What I was wondering is if it is also possible to create the objects
> >locally when the client and server are on the same machine without
> >creating another virtual directory on the client that points to the
> >(now local) objects?
> >
> >many thanks in advance
> >
> >Andy

Allen Anderson

6/25/2004 2:59:00 PM

0

I firmly agree that interfaces and abstract classes are by far the
best way to go with remoting. I''ve never been a fan of ''new'' based
remoting. Why do you not want to put the implementation dll in your
bin though? Is there perhaps another problem you are trying to solve
with that, that you could be solving in some other way?

Cheers,
Allen Anderson
http://www.glacialcomp...
mailto: allen@put my website url here.com

On 25 Jun 2004 07:28:23 -0700, adheyworth@hotmail.com (Andy) wrote:

>Thanks for your replies.
>
>I saw a Microsoft example but tehy used "new" on the object and the
>remoting infrastructure took care of that if the object was local or
>remote. Using interfaces you need direct access to the dll if you want
>to do a new on the object locally. I did not want to add a reference
>as that does not make sense if the dll is renmote on another machine.
>
>My solution is to add the dll to the bin directroy during installation
>(no direct reference from another dll on the client) which ASP.NET
>always loads automaticaly and do a CreatInstance on the object. Does
>this make sense?
>
>I just really like using the interface method for the remote objects
>as it is very secure but I do not want the virtual directory on the
>same machine when all code is installed on the same server. I think
>this is the best method I have seen so far.
>
>If anyone has other thoughts, please let me know.
>
>cheers
>
>Andy
>
>Allen Anderson <allen@sparkysystems.com> wrote in message news:<rsrld0d6nk8c0adephpe90e4r58544is4n@4ax.com>...
>> that depends, if the object dll is local then just include it as a
>> reference and you can use it at will. However, if you want to consume
>> that dll from remoting, remember you still need a host app for it of
>> some kind (whether a regular app or iis) so the dll will have to be
>> local to whatever is hosting the remoting object.
>>
>> Allen Anderson
>> http://www.glacialcomp...
>> mailto: allen@put my website url here.com
>>
>> On 24 Jun 2004 06:25:11 -0700, adheyworth@hotmail.com (Andy) wrote:
>>
>> >Hi,
>> >
>> >I have an ASP.Net client that uses remoting (HTTP in IIS) to connect
>> >to the server using only the interface of the required objects (as per
>> >Ingo Rammer examples). So the actual implementation assembly is not
>> >known on the client side.
>> >
>> >What I was wondering is if it is also possible to create the objects
>> >locally when the client and server are on the same machine without
>> >creating another virtual directory on the client that points to the
>> >(now local) objects?
>> >
>> >many thanks in advance
>> >
>> >Andy

Richard Bell

6/25/2004 3:47:00 PM

0

If the server is local (and/or in process), the stub assembly is by
implication visible to the client. Why then do you need to separate the
proxy from the stub? Calling CreateInstance is tantamount to calling ''new''
anyway.

"Allen Anderson" <allen@sparkysystems.com> wrote in message
news:g8fod05pk9cshsgd8lnvkgonadfj16uda9@4ax.com...
> I firmly agree that interfaces and abstract classes are by far the
> best way to go with remoting. I''ve never been a fan of ''new'' based
> remoting. Why do you not want to put the implementation dll in your
> bin though? Is there perhaps another problem you are trying to solve
> with that, that you could be solving in some other way?
>
> Cheers,
> Allen Anderson
> http://www.glacialcomp...
> mailto: allen@put my website url here.com
>
> On 25 Jun 2004 07:28:23 -0700, adheyworth@hotmail.com (Andy) wrote:
>
> >Thanks for your replies.
> >
> >I saw a Microsoft example but tehy used "new" on the object and the
> >remoting infrastructure took care of that if the object was local or
> >remote. Using interfaces you need direct access to the dll if you want
> >to do a new on the object locally. I did not want to add a reference
> >as that does not make sense if the dll is renmote on another machine.
> >
> >My solution is to add the dll to the bin directroy during installation
> >(no direct reference from another dll on the client) which ASP.NET
> >always loads automaticaly and do a CreatInstance on the object. Does
> >this make sense?
> >
> >I just really like using the interface method for the remote objects
> >as it is very secure but I do not want the virtual directory on the
> >same machine when all code is installed on the same server. I think
> >this is the best method I have seen so far.
> >
> >If anyone has other thoughts, please let me know.
> >
> >cheers
> >
> >Andy
> >
> >Allen Anderson <allen@sparkysystems.com> wrote in message
news:<rsrld0d6nk8c0adephpe90e4r58544is4n@4ax.com>...
> >> that depends, if the object dll is local then just include it as a
> >> reference and you can use it at will. However, if you want to consume
> >> that dll from remoting, remember you still need a host app for it of
> >> some kind (whether a regular app or iis) so the dll will have to be
> >> local to whatever is hosting the remoting object.
> >>
> >> Allen Anderson
> >> http://www.glacialcomp...
> >> mailto: allen@put my website url here.com
> >>
> >> On 24 Jun 2004 06:25:11 -0700, adheyworth@hotmail.com (Andy) wrote:
> >>
> >> >Hi,
> >> >
> >> >I have an ASP.Net client that uses remoting (HTTP in IIS) to connect
> >> >to the server using only the interface of the required objects (as per
> >> >Ingo Rammer examples). So the actual implementation assembly is not
> >> >known on the client side.
> >> >
> >> >What I was wondering is if it is also possible to create the objects
> >> >locally when the client and server are on the same machine without
> >> >creating another virtual directory on the client that points to the
> >> >(now local) objects?
> >> >
> >> >many thanks in advance
> >> >
> >> >Andy
>


Allen Anderson

6/25/2004 5:19:00 PM

0

If the server and client are on the same machine, they are by no means
or implication ''local'' to each other. And createinstance is in no way
tantamount to new. Now why don''t you go find another newsgroup to
troll on. Welcome to my kill filter.

Allen Anderson
http://www.glacialcomp...
mailto: allen@put my website url here.com

On Fri, 25 Jun 2004 16:46:38 +0100, "Richard Bell"
<richardb@rogge.co.uk> wrote:

>If the server is local (and/or in process), the stub assembly is by
>implication visible to the client. Why then do you need to separate the
>proxy from the stub? Calling CreateInstance is tantamount to calling ''new''
>anyway.
>
>"Allen Anderson" <allen@sparkysystems.com> wrote in message
>news:g8fod05pk9cshsgd8lnvkgonadfj16uda9@4ax.com...
>> I firmly agree that interfaces and abstract classes are by far the
>> best way to go with remoting. I''ve never been a fan of ''new'' based
>> remoting. Why do you not want to put the implementation dll in your
>> bin though? Is there perhaps another problem you are trying to solve
>> with that, that you could be solving in some other way?
>>
>> Cheers,

Richard Bell

6/25/2004 5:46:00 PM

0

Allen, easy mate, what''s your problem? This is a public discussion group
isn''t? I have no intention to insult you. If I have I appologise, but I do
not see how. I just have a different point of view. I have been coding
distributed systems for years, albeit mainly in DCOM, Java RMI and CORBA. I
have now been using .Net Remoting for 6 months and I am keen to learn. In
relation to this post, if the client and server are on the same machine then
the client can access the implementation assembly, can it not?. Therefore,
why seperate them? If he is using LoadAssembly, i.e. loading the assembly
into the client process, and then calling CreateInstance, then he might as
well call ''new'', might he not? It''s just one man''s view.

"Allen Anderson" <allen@sparkysystems.com> wrote in message
news:97nod0p0njfhf496gdmqu2qp095b7bek8t@4ax.com...
> If the server and client are on the same machine, they are by no means
> or implication ''local'' to each other. And createinstance is in no way
> tantamount to new. Now why don''t you go find another newsgroup to
> troll on. Welcome to my kill filter.
>
> Allen Anderson
> http://www.glacialcomp...
> mailto: allen@put my website url here.com
>
> On Fri, 25 Jun 2004 16:46:38 +0100, "Richard Bell"
> <richardb@rogge.co.uk> wrote:
>
> >If the server is local (and/or in process), the stub assembly is by
> >implication visible to the client. Why then do you need to separate the
> >proxy from the stub? Calling CreateInstance is tantamount to calling
''new''
> >anyway.
> >
> >"Allen Anderson" <allen@sparkysystems.com> wrote in message
> >news:g8fod05pk9cshsgd8lnvkgonadfj16uda9@4ax.com...
> >> I firmly agree that interfaces and abstract classes are by far the
> >> best way to go with remoting. I''ve never been a fan of ''new'' based
> >> remoting. Why do you not want to put the implementation dll in your
> >> bin though? Is there perhaps another problem you are trying to solve
> >> with that, that you could be solving in some other way?
> >>
> >> Cheers,
>