How to disable/enable network connection in c#

Found this thread while searching for the same thing, so, here is the answer 🙂 The best method I tested in C# uses WMI. http://www.codeproject.com/KB/cs/EverythingInWmi02.aspx Win32_NetworkAdapter on msdn C# Snippet : (System.Management must be referenced in the solution, and in using declarations) SelectQuery wmiQuery = new SelectQuery(“SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionId != NULL”); ManagementObjectSearcher … Read more

Error when trying to access XAMPP from a network [closed]

In your xampppath\apache\conf\extra open file httpd-xampp.conf and find the below tag: # Close XAMPP sites here <LocationMatch “^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))”> Order deny,allow Deny from all Allow from ::1 127.0.0.0/8 ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var </LocationMatch> and add “Allow from all” after Allow from ::1 127.0.0.0/8 {line} Restart xampp, and you are done. In later versions of Xampp …you can … Read more