PC Review


Reply
Thread Tools Rate Thread

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

 
 
Guest
Posts: n/a
 
      25th Nov 2004
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!



 
Reply With Quote
 
 
 
 
Peter Huang [MSFT]
Guest
Posts: n/a
 
      26th Nov 2004
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/de...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.

 
Reply With Quote
 
Guest
Posts: n/a
 
      26th Nov 2004
Hi!

> HttpContext.Current.Request.UserHostAddress


This exactly solved my problem! Thanks very very much!



 
Reply With Quote
 
Peter Huang [MSFT]
Guest
Posts: n/a
 
      29th Nov 2004
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.

 
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
connecting / bridging two small peer-to-peer networks ... -RS- Windows Networking 3 11th Aug 2007 05:11 AM
connecting to a macintosh peer to peer network =?Utf-8?B?am9lIGZsYXZvciBwYXBlcg==?= Windows XP Networking 0 23rd Mar 2005 10:45 PM
Connecting W2K to XP peer-to-peer =?iso-8859-1?Q?Ryan_Broom=E9?= Microsoft Windows 2000 Networking 1 10th Dec 2004 10:08 AM
Connecting wireless peer to peer Chris Lane Windows XP Networking 1 15th Nov 2003 07:28 AM
How can I get the peer's IP when using IIS-hosted remoting with binary formatter and HTTP? Microsoft Dot NET Framework 3 1st Aug 2003 08:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:47 PM.