Search:
Namespaces
Discussions
.NET v1.1
Feedback
Request server var in web service
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngwebservices' list
.
Jim Toth
-- Moved from [aspngfreeforall] to [aspngwebservices] by Tony Stark <
Click here to reveal e-mail address
> --
I have a web service created using VStudio.NET and would like to audit uses
of that service and capture IP address information in case I need to follow
up on fraudulent use. I looked at the Request variable's UserHostAddress
field, but in my web service I can't seem to access the Request variable
despite have System.Web included.
How can I access the Request variable in my web service, and if I cannot, is
there a workaround?
- Jim
Reply to this message...
Rob Caron
Your class needs to inherit from System.Web.Services.
WebService
or
you can use System.Web.
HttpContext
.Current.Request
- Rob Caron (
Click here to reveal e-mail address
)
-----Original Message-----
From: Jim Toth [mailto:
Click here to reveal e-mail address
]=20
Sent: Wednesday, June 19, 2002 12:29 PM
To: aspngwebservices
Subject: [aspngwebservices] Request server var in web service
-- Moved from [aspngfreeforall] to [aspngwebservices] by Tony Stark
<
Click here to reveal e-mail address
> --
I have a web service created using VStudio.NET and would like to audit
uses of that service and capture IP address information in case I need
to follow up on fraudulent use. I looked at the Request variable's
UserHostAddress field, but in my web service I can't seem to access the
Request variable despite have System.Web included.
How can I access the Request variable in my web service, and if I
cannot, is there a workaround?
- Jim
| [aspngwebservices] member
Click here to reveal e-mail address
=3D YOUR ID=20
|
http://www.asplists.com/asplists/aspngwebservices.asp
=3D JOIN/QUIT=20
|
http://www.asplists.com/search
=3D SEARCH Archives
Reply to this message...
Jim Toth
My web service was already inheriting from System.Web.Services.
WebService
(by default since VStudio created the service template page), but the
intellisense on the Request object wouldn't come up. I tried compiling
anyway and received an error that the object "Request" could not be found.
Once I typed in the fully qualified name like you mentioned below
(System.Web.
HttpContext
.Current.Request), it worked just fine.
Is there a reason that the Request object wouldn't be available in asmx
pages like it is in aspx pages?
Either way I'm up and running now, thanks for your help.
- Jim T.
----- Original Message -----
From: "Rob Caron" <
Click here to reveal e-mail address
>
To: "aspngwebservices" <
Click here to reveal e-mail address
>
Sent: Wednesday, June 19, 2002 2:10 PM
Subject: [aspngwebservices] RE: Request server var in web service
Your class needs to inherit from System.Web.Services.
WebService
or
you can use System.Web.
HttpContext
.Current.Request
- Rob Caron (
Click here to reveal e-mail address
)
-----Original Message-----
From: Jim Toth [mailto:
Click here to reveal e-mail address
]
Sent: Wednesday, June 19, 2002 12:29 PM
To: aspngwebservices
Subject: [aspngwebservices] Request server var in web service
-- Moved from [aspngfreeforall] to [aspngwebservices] by Tony Stark
<
Click here to reveal e-mail address
> --
I have a web service created using VStudio.NET and would like to audit
uses of that service and capture IP address information in case I need
to follow up on fraudulent use. I looked at the Request variable's
UserHostAddress field, but in my web service I can't seem to access the
Request variable despite have System.Web included.
How can I access the Request variable in my web service, and if I
cannot, is there a workaround?
- Jim
| [aspngwebservices] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngwebservices.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
| [aspngwebservices] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngwebservices.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
Gonzalo Giraldo
Context.Request.ServerVariables ["REMOTE_ADDR"]
--------------------------------
From: Gonzalo Giraldo
Reply to this message...
System.Runtime.Remoting.Contexts.Context
System.Web.HttpContext
System.Web.Services.WebService
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com