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

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!
 
P

Peter Huang [MSFT]

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.
 
P

Peter Huang [MSFT]

Hi

I am glad that helped you.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top