如何使用ASP.NET获取客户端的IP地址 [英] How to get a client's ip address with ASP.NET
本文介绍了如何使用ASP.NET获取客户端的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在访问我在asp.net内置的网站时获取客户端的IP地址。然后我想将它存储在我的数据库中。
有没有方法在asp.net应用程序中实现这个目标。
如果你能帮助我,我将非常感谢你。
I want to fetch client''s ip address as soon as he accesses my web-site built in asp.net.Then i want to store it in my database.
Is there any method to achieve this target in asp.net application.
If you could help me i will be very thankful to you.
推荐答案
ASP。网页:
ASP .Net web page:
展开 | 选择 < span class =codeDivider> | Wrap | 行号
或者您可以尝试:
or you can try:
展开 | 选择 | Wrap | / span> 行号
这对我很有帮助。非常感谢
This is very helpful for me. Many thanks
这篇关于如何使用ASP.NET获取客户端的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文