[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

John Zink

1/7/2003 8:57:00 PM

Is there a way to access the REMOTE_ADDR server variable
either thru the HttpSoapContext.RequestContext or
System.Web.Services.Protocols.SoapMessage within a SOAP
extension ?
I am building a logging/auditing SOAP Extension and would
like to log the IP address of the caller.


thanks
john z
5 Answers

Manni

1/7/2003 9:48:00 PM

0

How about

Context.Request.UserHostAddress
or if you prefer
Context.Request.ServerVariables["REMOTE_ADR")

hope this helps!!

Manfred


"John Zink" <john.zink@prudential.com> schrieb im Newsbeitrag
news:130b01c2b686$f7116360$8af82ecf@TK2MSFTNGXA03...
> Is there a way to access the REMOTE_ADDR server variable
> either thru the HttpSoapContext.RequestContext or
> System.Web.Services.Protocols.SoapMessage within a SOAP
> extension ?
> I am building a logging/auditing SOAP Extension and would
> like to log the IP address of the caller.
>
>
> thanks
> john z


Scott Swigart

1/8/2003 1:08:00 AM

0

Also, do you need a Soap Extension for this? If you're doing it on every
request to every method, you may just want to stick it in Global.asax.

--
Scott Swigart
www.3leaf.com
Early Adopter Weblog: http://radio.weblogs.co...

"Manni" <pcpohler@hotmail.com> wrote in message
news:uSLaW4otCHA.1132@TK2MSFTNGP12...
> How about
>
> Context.Request.UserHostAddress
> or if you prefer
> Context.Request.ServerVariables["REMOTE_ADR")
>
> hope this helps!!
>
> Manfred
>
>
> "John Zink" <john.zink@prudential.com> schrieb im Newsbeitrag
> news:130b01c2b686$f7116360$8af82ecf@TK2MSFTNGXA03...
> > Is there a way to access the REMOTE_ADDR server variable
> > either thru the HttpSoapContext.RequestContext or
> > System.Web.Services.Protocols.SoapMessage within a SOAP
> > extension ?
> > I am building a logging/auditing SOAP Extension and would
> > like to log the IP address of the caller.
> >
> >
> > thanks
> > john z
>
>


John Zink

1/8/2003 1:44:00 PM

0

I'm not sure that I have access to the HTTPContext within
a SOAP extension. I'll have to do some research on this
one. Thanks for your reply.
>-----Original Message-----
>How about
>
> Context.Request.UserHostAddress
>or if you prefer
> Context.Request.ServerVariables["REMOTE_ADR")
>
>hope this helps!!
>
>Manfred
>
>
>"John Zink" <john.zink@prudential.com> schrieb im
Newsbeitrag
>news:130b01c2b686$f7116360$8af82ecf@TK2MSFTNGXA03...
>> Is there a way to access the REMOTE_ADDR server variable
>> either thru the HttpSoapContext.RequestContext or
>> System.Web.Services.Protocols.SoapMessage within a SOAP
>> extension ?
>> I am building a logging/auditing SOAP Extension and
would
>> like to log the IP address of the caller.
>>
>>
>> thanks
>> john z
>
>
>.
>

John Zink

1/8/2003 1:46:00 PM

0

Global.asax might be a possible solution, but I am using a
SOAP extension because this will be applied to multiple
projects. I don't want the developers to have to modify
their global.asax for each project. With a soap extension
they can easily apply it to their WEB Methods via
web.config or a CLR attribute
>-----Original Message-----
>Also, do you need a Soap Extension for this? If you're
doing it on every
>request to every method, you may just want to stick it in
Global.asax.
>
>--
>Scott Swigart
>www.3leaf.com
>Early Adopter Weblog: http://radio.weblogs.co...
>
>"Manni" <pcpohler@hotmail.com> wrote in message
>news:uSLaW4otCHA.1132@TK2MSFTNGP12...
>> How about
>>
>> Context.Request.UserHostAddress
>> or if you prefer
>> Context.Request.ServerVariables["REMOTE_ADR")
>>
>> hope this helps!!
>>
>> Manfred
>>
>>
>> "John Zink" <john.zink@prudential.com> schrieb im
Newsbeitrag
>> news:130b01c2b686$f7116360$8af82ecf@TK2MSFTNGXA03...
>> > Is there a way to access the REMOTE_ADDR server
variable
>> > either thru the HttpSoapContext.RequestContext or
>> > System.Web.Services.Protocols.SoapMessage within a
SOAP
>> > extension ?
>> > I am building a logging/auditing SOAP Extension and
would
>> > like to log the IP address of the caller.
>> >
>> >
>> > thanks
>> > john z
>>
>>
>
>
>.
>

John Zink

1/8/2003 3:49:00 PM

0

This seems to work within the SOAP extension:
System.Web.HttpContext.Current.Request.UserHostAddress

thanks for your help
>-----Original Message-----
>I'm not sure that I have access to the HTTPContext within
>a SOAP extension. I'll have to do some research on this
>one. Thanks for your reply.
>>-----Original Message-----
>>How about
>>
>> Context.Request.UserHostAddress
>>or if you prefer
>> Context.Request.ServerVariables["REMOTE_ADR")
>>
>>hope this helps!!
>>
>>Manfred
>>
>>
>>"John Zink" <john.zink@prudential.com> schrieb im
>Newsbeitrag
>>news:130b01c2b686$f7116360$8af82ecf@TK2MSFTNGXA03...
>>> Is there a way to access the REMOTE_ADDR server
variable
>>> either thru the HttpSoapContext.RequestContext or
>>> System.Web.Services.Protocols.SoapMessage within a SOAP
>>> extension ?
>>> I am building a logging/auditing SOAP Extension and
>would
>>> like to log the IP address of the caller.
>>>
>>>
>>> thanks
>>> john z
>>
>>
>>.
>>
>.
>