本文介绍了如何配置配置文件以允许获取网络信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下代码从服务器获取访问者的实际地址

i'm getting visitor's physical address from server using following code

public string GetMACAddress()
        {
            NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
            String sMacAddress = string.Empty;
            foreach (NetworkInterface adapter in nics)
            {
                if (sMacAddress == String.Empty)// only return MAC Address from first card  
                {
                    IPInterfaceProperties properties = adapter.GetIPProperties();
                    sMacAddress = adapter.GetPhysicalAddress().ToString();
                }
            } return sMacAddress;
        }



遗憾的是托管系统管理员阻止了这一点。

需要做什么才能通过web配置文件。


unfortunately this was prevented by hosting system administrator.
what need to be done to make allow it through web configuration file.

推荐答案


这篇关于如何配置配置文件以允许获取网络信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 08:23