Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2007

Tip: Looking for answers? Try searching our database.

Source of a web service request

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BillGatesFan - 13 Nov 2007 18:23 GMT
Is there anyway to tell when a web service is called, where the call
came from? Like IP address. In the code?

I have a web service where I would like to know where the call came
from then I want to do something different if the call came from a
certain IP address.

Thanks
John Saunders [MVP] - 14 Nov 2007 15:23 GMT
> Is there anyway to tell when a web service is called, where the call
> came from? Like IP address. In the code?
>
> I have a web service where I would like to know where the call came
> from then I want to do something different if the call came from a
> certain IP address.

Try Context.Request.UserHostAddress.

I presume you're aware that an IP address may not be a good identifier of a
particular machine? It can change, it can be the address of a NAT box or
proxy, etc. Instead, if you want to identify a caller, it should be with an
identification schema that you design. For instance, require the client to
send you a particular certificate, or to send you some information with a
digital signature.
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.