Groups | Blog | Home
all groups > dotnet remoting > october 2003 >

dotnet remoting : Get IP of calling computer


Jeff
10/31/2003 1:02:43 PM
When a remoting method is executed on the server, I need
to check / record the IP address of the user that is
executing the method.

Any Ideas?

Thanks-

-Jeff
Timofey Kazakov
11/1/2003 5:06:11 PM
SGVsbG8sICJKZWZmIiANCj4gV2hlbiBhIHJlbW90aW5nIG1ldGhvZCBpcyBleGVjdXRlZCBvbiB0
aGUgc2VydmVyLCBJIG5lZWQgDQo+IHRvIGNoZWNrIC8gcmVjb3JkIHRoZSBJUCBhZGRyZXNzIG9m
IHRoZSB1c2VyIHRoYXQgaXMgDQo+IGV4ZWN1dGluZyB0aGUgbWV0aG9kLg0KPiANCj4gQW55IElk
ZWFzPw0KPiANClNlZSBleGFtcGxlIGluIEZyYW1ld29yayBTREsgIlxTYW1wbGVzXFRlY2hub2xv
Z2llc1xSZW1vdGluZ1xBZHZhbmNlZFxDaGFubmVsU2lua3NcSVBGaWx0ZXJcIg==
Michael Ames
11/4/2003 11:10:18 AM
If you are hosting your objects in IIS, it's very simple, because you can
get access to the entire HttpContext object, which has all kinds of goodies
in it.

VB example:

dim context as httpContext=httpContext.Current
dim addr as string=context.Request.UserHostAddress

Good luck,

-Michael


[quoted text, click to view]

Tony
12/3/2003 7:25:52 PM
I also need to get the IP of the client, but my remoting server is running
as a Windows Service.

Any ideas on how I do it from a service?

Tony

[quoted text, click to view]

AddThis Social Bookmark Button