Re: Client Information
- From: "John Saunders [MVP]" <john.saunders at trizetto.com>
- Date: Thu, 8 Nov 2007 18:04:53 -0500
"Scott" <Scott@xxxxxxxxxxxxxx> wrote in message
news:uPW36QkIIHA.1316@xxxxxxxxxxxxxxxxxxxxxxx
Ok, in detail...
I have created a WebService in VS 2005 using C# that returns the
results
of a database search in an XML dataset .
The purpose is to allow clients access to this webservice so that they
can utilize the search options I make public through the webservice. By
doing it this way clients who use this service should be able to
incorporate
my data into their website as if it were their own.
What I am trying to record is the URL of the page that accessed the
webservice and the IP of the domain that page is under.
For example:
The company XYZ.com (IP: 111.111.111.111) would like to use my data
on their website. using the webservice I have created they access the
webservice through code on www.xyz.com/search.aspx which returns an XML
dataset which they can display on their page.
In this example what I would like to record is
"www.xyz.com/search.aspx"
and "111.111.111.111".
Let me know if that still doesn't make sense.
It makes sense; it's just not practical.
As another poster as indicated, you can get the IP address that accessed the
service. This may or may not correspond to an actual web server. It could
just as easily be the IP address of a NAT box or some other piece of network
equipment.
Picture the classic seven-layer model. IP addresses belong to the Network
layer. This means that the Network layer can do whatever it wants to with an
IP address, as long as it doesn't screw up the Transport layer. In other
words, your code (in the Application Layer) shouldn't be depending on IP
addresses to mean anything at the Application Layer. They are Network Layer
artifacts.
If you want an identifier you can depend on at the Application Layer, you
will need to create one: a certificate, for instance.
You will never get the URL of the page that called the service because pages
don't call services - code does. That code may or may not be on a web page,
and it may or may not know the URL of the web page. That URL might or might
not be useful in locating the page again from a browser's address bar, but
it's not likely to be too useful to use as an identification - consider the
case of a web farm, for instance, or the case where the URL of the page has
nothing to do with the domain of the company (assuming that the company only
owns a single domain).
You go on to mention the IP address of the domain. That term has no meaning.
Domains do not have IP addresses, per se.
All in all, you should just totally forget the idea of the networking
infrastructure doing your job for you. If you need to identify users and/or
the company they work for (or some other licensed entity), then you need to
do that explicitly, with your own code, written to your own requirements,
and not written to the requirements of IP Networking, or of Web Browsing, or
of DNS Domains.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
.
- Follow-Ups:
- Re: Client Information
- From: Scott
- Re: Client Information
- References:
- Re: Client Information
- From: John Saunders [MVP]
- Re: Client Information
- From: Scott
- Re: Client Information
- Prev by Date: Re: Client Information
- Next by Date: Re: Efficient Asynchronous Call to Webservice
- Previous by thread: Re: Client Information
- Next by thread: Re: Client Information
- Index(es):
Relevant Pages
|
Loading