IP-adress of connecting peer when using remoting over HTTP in IIS

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I'm writing a remoting application that is hosted in
IIS6 and uses the binary formatter with
HTTP. Because this application will place database-locks
I'd like to know who the other side is who makes a
connection.

How can I get the ip-adress of the connecting peer?

There already exists an example on
http://www.dotnetremoting.cc/Download/IPCheck.zip
but this only works with standalone hosting in an
EXE-file!

How must this be changed to work with hosting in IIS?

Because I'm already using .NET Framework V2 (which
is unsupported, but maybe it is easier to do with V2)
Beta 1: Is there maybe an easier way to get the peer IP?

Many thanks for your answers!
 
Hi

I think you may try to get the HttpContext directory since the remoteobject
is hosted in the IIS.

Here is example about use HttpContext in remoteobject hosted in IIS.
You may use the code below to get the requester's IP.
HttpContext.Current.Request.UserHostAddress
Remoting Example: Hosting in Internet Information Services (IIS)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconremotingexamplehostinginiis.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top