I have the following code in the code file for the .aspx page in the project:
Dim searcher As New ManagementObjectSearcher("SELECT RemoteName FROM win32_NetworkConnection WHERE LocalName = '" & sFilePath.Substring(0, 2) & "'") For Each managementObject As ManagementObject In searcher.[Get]() Dim sRemoteName As String = TryCast(managementObject("RemoteName"), String) sRemoteName += sFilePath.Substring(2) Return (New Uri(sRemoteName)).ToString() Next Return sFilePath
The ManagementObjectSearcher and ManagementObject elements are underlined and say they are undefined.
I added the System.Management link, deleted and read, deleted my cache, rebuilt the entire .aspx page, deleted the .dll and many other troubleshooting tips that I found on Google, but still cannot find the answer to this problem.
Please, help!
source share