Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
8
Answers
How to get Visitor IP Address and Location in ASP.Net
Sonu Pandey
8y
517
1
Reply
I am using this code but this is not show Visitor IP Address
string ipaddress;
ipaddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (ipaddress == "" || ipaddress == null)
{
ipaddress = Request.ServerVariables["REMOTE_ADDR"];
}
Response.Write(ipaddress);
Please help me
Post
Reset
Cancel
Answers (
8
)
Next Recommended Forum
Please help why controls name doesn't exist error!!
language translator in asp.net