| | |
ASP.NET: Track IP Address
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
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
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 •
•
Join Date: Jun 2005
Posts: 50
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
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.
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.
•
•
Join Date: Jun 2005
Posts: 50
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
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
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
•
•
Join Date: Mar 2006
Posts: 84
Reputation:
Solved Threads: 1
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
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
•
•
Join Date: Oct 2008
Posts: 2
Reputation:
Solved Threads: 0
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
•
•
Join Date: Jul 2009
Posts: 5
Reputation:
Solved Threads: 1
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):
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:
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:
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):
ASP.NET Syntax (Toggle Plain Text)
Dim strX as STring strX = Request.UserHostAddress() 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:
ASP.NET Syntax (Toggle Plain Text)
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:
ASP.NET Syntax (Toggle Plain Text)
Dim strX as string; strX = Request.ServerVariables("HTTP_X_FOWARDED_FOR"); if(strX==string.Empty) { strX=Request.ServerVariables("REMOTE_ADDR"); }
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- is there a way to get an ip using c# and asp.net (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: updating gridview?
- Next Thread: ARB + Authorize.net...?
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox class compatible confirmationcodegeneration content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv forms gridview gudi homeedition iis javascript jquery list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xml xsl





