Multimobile Development: Building Applications for any Smartphone
How to get client IP in ASP .NET web Services
Messages   Related Types
This message was discovered on microsoft.public.fdtnservices.netmyservices.sdk.


wangyang
GOOD ANSWER
Dear all:

In ASP .Net Web page,the following code can get client IP:
Dim strClientIP As String
strClientIP = Request.UserHostAddress()
Response.Write(strClientIP)

But How to get client IP in ASP .NET web Services.

Thanks a lot.

Reply to this message...
Vote that this is a GOOD answer... (33 votes from other users already)
 
 
    
bardoux
GOOD ANSWER
Context.Request.ServerVariables ["REMOTE_ADDR"]

[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer... (19 votes from other users already)
 
 
 
System.Runtime.Remoting.Contexts.Context




Multimobile Development: Building Applications for any Smartphone
Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734