Re: remoting options
- From: <param@xxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 13:44:09 -0500
Peter, here are the steps I employed:-
1. Coded a basic object and compiled it into a dll.
2. Hosted it in IIS on the server with the following lines in web.config:-
<system.runtime.remoting>
<application>
<service>
<wellknown mode="SingleCall" objectUri="CommonFactory.rem"
type="AppOne.Core.Factories.CommonFactory, AppOne.Core"/>
</service>
<channels>
<channel ref="http"/>
</channels>
</application>
</system.runtime.remoting>
3. Created a simple web .aspx page which calls the remote object.
4. Copied the "server dll" into the bin directly on the client.
5. Added the following lines to the web.config on the client
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="true" port="0">
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
</channel>
</channels>
<client>
<wellknown url="http://testserver2:82/CommonFactory.rem"
type="AppOne.Core.Factories.CommonFactory, AppOne.Core"/>
</client>
</application>
</system.runtime.remoting>
6. I added the following lines to global.asax on the client web app
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
System.Runtime.Remoting.RemotingConfiguration.Configure(Server.MapPath("web.config"))
End Sub
I then invoked the client web page and it worked! I know it invoked a remote
call because I checked the log on the server and I could see the client ip
address made a call to the .rem object...
So I guess what I am saying is that it works, but is using soapsuds the
recommended way to go?
thanks!
"peter" <apvx95@xxxxxxxxxxxxx> wrote in message
news:42c189a1$0$13499$cc9e4d1f@xxxxxxxxxxxxxxxxxxxxxx
> param@xxxxxxxxxxxxxxxx wrote:
>> Peter, I understand. I actually tried some remoting code as follows:-
>>
>> 1. Compiled SAO object into 1 dll and configured it on IIS on server with
>> the help of config files.
>> 2. Copied same dll into bin directory of client asp.net web app and
>> configured remoting through web.config file on client by setting
>> protocols channels etc.
>>
>> It worked. Now if I use soapsuds I am presuming I will compile and copy
>> the cs file generated into my client code and go from there. I remember I
>> used to do that with wsdl.
>>
>> One of the reasons I like hosting the remote object in IIS is to make use
>> of load balancing at some point to load balance my application servers.
>>
>> thanks
>>
>
> I don't understand what you're doing here. If you're saying that you have
> compiled your remote object dll into your client (i.e. your asp.net
> project has a reference to the server dll), then that is a mistake. As
> I've said, it is both insecure and will not work in some situations.
>
> If you are saying you just copied the dll without referencing it then I
> have absolutely no idea what's going on.
>
> Do you have the following lines (or their VB equivalent) somewhere in your
> code (hopefully in Application_start()):
>
> string path = Server.MapPath("config_file_name");
> RemotingConfiguration.Configure(path);
>
> If you don't have at least the second line above then I don't see how you
> are configuring .NET remoting from a config file. I might even go so far
> as to suspect that you are not making a remote call at all - just a local
> one to the dll referenced in you client (assuming it is).
>
> I'm sure you're doing just fine, but I'm interested to know how it's
> working.
>
> 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
- Re: remoting options
- From: param
- Re: remoting options
- From: peter
- remoting options
- Prev by Date: Re: remoting options
- Next by Date: Re: remoting options
- Previous by thread: Re: remoting options
- Next by thread: Re: remoting options
- Index(es):
Relevant Pages
|