Static IP

  • Thread starter Thread starter Charles A. Lackman
  • Start date Start date
C

Charles A. Lackman

Hello,
How do I retrive the Visitors IP Address from my web service. I have been
searching within the System.Environment properties and do not see anything
that would lead me to believe it will get the static IP. Also, wondering
why I cannot recieve the SessionID using the following code:

Dim TheID as Long = Session.SessionID

Error Message: Object not set to an instance of an object.

Thanks,

Chuck
 
Session state is not enabled by default. You have to turn it on. You can
do this with an attribute.
This is discussed near the bottom of this page:
http://www.dotnetbips.com/displayarticle.aspx?id=41

This should give you the IP address of the computer making the request:
Request.ServerVariables("REMOTE_ADDR")
 
1) Page.Request.ServerVariables["REMOTE_ADDR"];

2) you must turn session on, your Session variable is null, and SessionId is
a string


-- bruce (sqlwork.com)
 

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

Back
Top