ASP.NET: Track IP Address

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2005
Posts: 50
Reputation: Naters_uk is an unknown quantity at this point 
Solved Threads: 0
Naters_uk Naters_uk is offline Offline
Junior Poster in Training

ASP.NET: Track IP Address

 
0
  #1
Jan 27th, 2006
To make my site secure, i would like to track the ip address of my members to my transaction page. Is there any possible ways of achieving this?

I came across many Javascript IP Address display, however they do not actually track or save the ip addresses.
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: ASP.NET: Track IP Address

 
0
  #2
Jan 27th, 2006
the request object has all the information you need about the client. The only problem you would have with ip addresses is if you are behind ISA2000 (not the 2004) or they are behind some proxy.

How will it make your site secure? Are you going to log all ips against a person? I have over 50 class A ip addresses and i also have some dynamic class c ones.. are you going to log all of them? how? why? What does it achieve? There are times when you do need to track an ip but it is for auditing usually and sometimes it is necessary when only allowing one login at a time (but then you get into the realms of having to know when i crashed or timed out and now have a new ip).

Tell us what you are trying to achieve and we will give you the correct solution instead as i dont think this will suit your purpose
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 50
Reputation: Naters_uk is an unknown quantity at this point 
Solved Threads: 0
Naters_uk Naters_uk is offline Offline
Junior Poster in Training

Re: ASP.NET: Track IP Address

 
0
  #3
Jan 28th, 2006
f1fan: i would appreciate if you can speak in layman terms. None of the postings are useful if i can't understand what you are talking about.

Tracking IP is suppose to be an additional security against fraud transactions. I am not asking for a complicated proof free assistance. I am not a programme pro as i mentioned to you before.
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: ASP.NET: Track IP Address

 
0
  #4
Jan 28th, 2006
1. This is a TECHNICAL forum so excuse me for speaking in non laymans terms
2. From all of your posts it is obvious that you have no idea about programming/websites/security etc. Whilst i appreciate we all have to start somewhere it is also becoming apparant that this site you are building is destined for a real life commercial website which scares me. To think that you are messing with other peoples money, credit card information and such is frightening. Your site will be hacked in under 30 seconds and peoples information could possibly be at risk. I sincerely hope that you have a vast amount of liability insurance as you will need it.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 50
Reputation: Naters_uk is an unknown quantity at this point 
Solved Threads: 0
Naters_uk Naters_uk is offline Offline
Junior Poster in Training

Re: ASP.NET: Track IP Address

 
0
  #5
Jan 28th, 2006
Precisely its a technical assistance forum that if one knows anything, to direct with codes and assistance. What assistance you are providing are just blunt words with no clear directions.

I am not going to get myself into a ridiculous argument with you. I am working on a school project which is NOT destined for commercial uses, as for improvements, there's always something new to it, being a newbie. Unfortunately, since you are so fanastic about yourself, and i am not on your level, i would appreciate you do not respond to my request for assistance. Thank you
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: ASP.NET: Track IP Address

 
0
  #6
Jan 29th, 2006
Please read the forum guidelines at this link
http://www.daniweb.com/techtalkforum...ement61-2.html

I gave help and advice without doing the coding for you as i expected you to be able to at least look up what i had mentioned. I had on a few occassions written the code for you also. I cannot accurately gauge your level of understanding so all you had to do was ask for amplification of something instead of complaining about my answers. I have been programming for 27years and am still learning. So i dont think of myself as fantastic. I try and help those who help themselves but either you have been assigned a project that is way beyond what you have been taught - in which case i would raise it with your instructor, or you have chosen a project which is way beyond what you have been taught. In which case i would have to ask why.

But as you have requested, i have removed myself from this thread and wont answer any more of your questions. Good luck with your project
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 84
Reputation: web_developer is an unknown quantity at this point 
Solved Threads: 1
web_developer web_developer is offline Offline
Junior Poster in Training

Re: ASP.NET: Track IP Address

 
0
  #7
Mar 27th, 2006
ok guys, lets stop all that.
we all here want to help each other.

"naster" i understood and if i'm wrong plz correct me.
u want to write all the ips logged into ur system in ur database. why is that?

to do that, as our friend above-said, "request and response" objects.
they are opposite, when u use response object, u ask the server for something and when u use request object, u r takign information from the user side.

google it and read about it. it will help u

sam
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2
Reputation: labuji is an unknown quantity at this point 
Solved Threads: 0
labuji labuji is offline Offline
Newbie Poster

Re: ASP.NET: Track IP Address

 
0
  #8
Jul 19th, 2009
I got similar problem, that i tried both "request and response objects" but none return the client Ip, but IP of the server. This is just within LAN with about 15 to 25 client machines, with ISA Server. This is just for redirecting user with IP reservations. Is the ISA firewall and proxy got something to do with the prob? Thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 5
Reputation: dquiles is an unknown quantity at this point 
Solved Threads: 1
dquiles dquiles is offline Offline
Newbie Poster

Re: ASP.NET: Track IP Address

 
0
  #9
Jul 20th, 2009
Hi,

I'm not sure what the C# equivalent of this is, but it's probably not too much different (drop the dim, set the string setting in front):

  1. Dim strX as STring
  2. strX = Request.UserHostAddress()
  3. Response.Write(strX)

Obviously, you can substitute the variable name with whatever you want. Also, you don't have to Response.Write it, in fact you probably (99%) won't want to, that was just an example of using the variable.

IF that doesn't work for you, you can also do the following:

  1. Context.Request.ServerVariables["REMOTE_ADDR"]

now, if that might also give you the user's ISP's IP, so it'll get tricky, and you'll want to do the following:

  1. Dim strX as string;
  2. strX = Request.ServerVariables("HTTP_X_FOWARDED_FOR");
  3. if(strX==string.Empty)
  4. {
  5. strX=Request.ServerVariables("REMOTE_ADDR");
  6. }
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2
Reputation: labuji is an unknown quantity at this point 
Solved Threads: 0
labuji labuji is offline Offline
Newbie Poster

Re: ASP.NET: Track IP Address

 
0
  #10
Jul 21st, 2009
however, that returns the proxy ip, and never the client ip address.

Like my problem, running webserver behind (ISA) Proxy, thus the code always returns the Server IP. Even in local area network only, where I am currently stuck
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC