How do I get the sender's address of a web service or SOAP message?

R

Richard Martino

Dear Experts:

I am using the new Microsoft Web Services Enhancements (WSE) to send
SOAP messages from a client to a web service.

How can I get identifying information of the sender (aka transmitter,
aka originator, aka requestor) of the web request?

By comparison, for a completely different project, I have an internet
web site running PHP in which I can get the IP address of the sender,
the browser type, even the previous URL address (referrer) that the
user was at.

By analogy, I believe that I should be able to get some identifying
information of the sender, at least the IP address. After all, the
"network" needs to know where to send the response back to from my web
service.

I am writing in C# .NET and looked in namespaces such as:

Microsoft.Web.Services2.Addressing, and
Microsoft.Web.Services2.RequestSoapContext

but have not (yet) found out how to identify the sender.

I do not want to require -or trust- the sender to identify itself in
any API. There's bound to be some internet protocol data
communications stuff that identifies, to some degree, who sent me any
message.

Thanks
 
C

Chris Rolon

Are you trying to identify the PC or the user? If the PC you can get the IP
address from the HTTP header. If the user, you will want to get the
authentication information--UserNameToken, Kerberos, X509 Cert, and send
that information along with each Web Service call.

Chris Rolon
 
D

Dilip Krishnan

Hello Richard,
In WSE u should be able to get to the sender info using Context.Addressing.From

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
 
R

Richard Martino

Chris (or others):

Thanks for the hint:

"If the PC you­ can get the IP address from the HTTP header."

but sometimes (like now) I need very specific directions.

How do I get the HTTP header?

Source code that I can cut and paste would be real nice :)
Thanking you in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top