开发者

Request.ServerVariables["REMOTE_ADDR"] gets IP6 instead IP4

开发者 https://www.devze.com 2023-01-30 10:14 出处:网络
Here is my code: string ip = Request.ServerVariables[\"REMOTE_ADDR\"] I use it for saving the IP for eac开发者_如何学编程h login to a UserLog table.

Here is my code:

string ip = Request.ServerVariables["REMOTE_ADDR"]

I use it for saving the IP for eac开发者_如何学编程h login to a UserLog table. Poorly it saves the IP6 instead of the IP4.

What is the corret way?

0

精彩评论

暂无评论...
验证码 换一张
取 消