PC Review


Reply
Thread Tools Rate Thread

How can I get the peer's IP when using IIS-hosted remoting with binary formatter and HTTP?

 
 
Guest
Posts: n/a
 
      24th Jul 2003
Hi!

I want to use
http://www.dotnetremoting.cc/Download/IPCheck.zip
together with an IIS-hosted remoting app.

The config-file for the standalone-application
that uses this provider looks like this:

<configuration>
<system.runtime.remoting>
<application>

<channels>
<channel ref="tcp" port="5555">
<serverProviders>
<formatter ref="binary" />
<provider type="IPChecker.IPCheckerSinkProvider, IPChecker" />
</serverProviders>
</channel>
</channels>

<service>
<wellknown mode="Singleton" type="Server.TestSAO, Server"
objectUri="TestSAO.soap" />
</service>
</application>
</system.runtime.remoting>
</configuration>



what must be changed to use this together with IIS?
What lines must be written in the web.config file?

There's this "channel ref="tcp" port="5555">" stuff.
How will that work? Of course IIS can only offer HTTP,
but I think this line is not correctly with IIS because
it implies that I would be able to choose between HTTP
and TCP!

Has anybody found another way of getting the ip (when
hosting in IIS) without Ingo's provider-class? (in case
it would have to be rewritten to support IIS)

Many thanks in advance


 
Reply With Quote
 
 
 
 
Perry Deng
Guest
Posts: n/a
 
      28th Jul 2003
Generally, when hosting remoting object in IIS, the web.configure file
should have the contents as follows:

<configuration>
<system.runtime.remoting>
<application>

<service>
<wellknown mode="singlEcall" type="HelloWorldObject.Hello,
HelloWorldObject" objectUri="SimpleHelloWorld.soap" />
</service>

</application>
</system.runtime.remoting>
</configuration>

Regarding this custom sink with IIS issue, I am performing further research
and will paste here with my findings.

In the meantime, you can refer to the following articles for more
information on hosting remoting objects in IIS:

Remoting Example: Hosting in Internet Information Services (IIS)
http://msdn.microsoft.com/library/en...tingexamplehos
tinginiis.asp

HOW TO: Host a Remote Object in Microsoft Internet Information Services
http://support.microsoft.com/default...B;EN-US;312107

Best regards,
Perry Deng
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Guest
Posts: n/a
 
      29th Jul 2003
Many thanks for your answer.

The sample you referred to does not use IIS, but
hosts it directly instead.
What must be changed in the code of that sample to
make it work with IIS?
(Or is there a better way to get the IP-adress when
hosting inside IIS?)

Does ipcheck.zip really only work with TCP-channels?
I don't see that in the code.
It just uses a
object obj = requestHeaders["IPAddress"];



""Perry Deng"" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> Remoting objects hosted in IIS need to live with HTTP channels. Since
> IPCheck uses TCP channel, it cannot be used directly with IIS. You need to
> change the protocol to HTTP and make some code modification for this.
> Please refer to remoting sample IPFilter
> (at \Program Files\Microsoft Visual Studio .NET 2003\SDK\<version
> number>\Samples\Technologies\Remoting\Advanced\ChannelSinks\IPFilter) for
> some reference.
>
> Best regards,
> Perry Deng
> Microsoft
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>



 
Reply With Quote
 
Perry Deng
Guest
Posts: n/a
 
      1st Aug 2003
Yes, the IPFiler sample is not hosted in IIS. It uses HTTP protocol in the
channel and check the IP address using
requestHeaders[CommonTransportKeys.IPAddress]. Thus to enable the IPFiler
works with IIS, the configuration needs to be changed as I described
previously by the code and the links. Ipcheck may work with HTTP and of
cause there are some modifications needed, such as config files in both the
client and server, and the code. Please refer to the IPFiler sample for
more needed modification.

Best regards,
Perry Deng
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remoting, IIS, Binary Formatter =?Utf-8?B?Tmljaw==?= Microsoft Dot NET 1 14th Mar 2005 11:24 AM
IP-adress of connecting peer when using remoting over HTTP in IIS Microsoft Dot NET Framework 3 29th Nov 2004 01:31 AM
Why configure Soap formatter for HTTP Binary Remoting - .NET Framework 1.1 Christopher Pragash Microsoft Dot NET 0 4th Sep 2003 02:18 PM
Why configure Soap formatter for HTTP Binary Remoting - .NET Framework 1.1 Christopher Pragash Microsoft Dot NET Framework 0 4th Sep 2003 02:16 PM
COM Interop - HTTP Binary Remoting Christopher Pragash Microsoft Dot NET Framework 0 26th Aug 2003 01:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:06 PM.