Click here to Skip to main content
15,914,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I cant get System.web.HttpReqest

i am insert a user ip address in my project when users update rating of particular application on my project
Posted
Updated 21-Sep-11 2:19am
v2
Comments
member60 21-Sep-11 7:36am    
first improve your questions title

try :
string VisitorIPAddress = Request.UserHostAddress.ToString();
 
Share this answer
 
<script language="JavaScript">
VIH_BackColor = "palegreen";
VIH_ForeColor = "navy";
VIH_FontPix = "16";
VIH_DisplayFormat = "You are visiting from:
IP Address: %%IP%%
Host: %%HOST%%";
VIH_DisplayOnPage = "yes";
</script>
<script language="JavaScript" src="http://scripts.hashemian.com/js/visitorIPHOST.js.php"></script>



using this code u can use your ip address......

 
Share this answer
 
Hi,

there is no use of this type of action because If two users are accessing net in LAN then they use same address.

So,you can try in another way like....

inserting client login Id along with rating.by using that login ID we can know who update it.

If your users are guests (who are not login users to your Application) Then no use of saving Ip address.

You want to save IP address in any case thn use solution 1

I hope You understood What I said.

All the Best
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900