OK - now I'm really confused how this is supposed to work.
When I pass in a 'junk' proxy string to SetCustomProxy or TurboActivate.exe I would expect the internet connection to fail - it doesn't. Is this correct?
NOTE: we don't currently use a proxy server and go straight out to our ISP.
See the following functions:
internal static String GetCustomProxy() { //TurboActivate.exe --proxy="http://username:password@host:port/" String customProxyString = null; String customProxyFileName = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\" + Properties.Resources._CustomProxyFileName;
if (File.Exists(customProxyFileName) == true) { String txtString = String.Empty; using (StreamReader sr = new StreamReader(customProxyFileName)) { txtString = sr.ReadToEnd(); } if (txtString == null || txtString.Length == 0) customProxyString = String.Empty; else if (txtString != String.Empty) customProxyString = txtString; MessageBox.Show("CustomProxy=='"+customProxyString+"'"); } else MessageBox.Show("CustomProxy NOT FOUND"); return customProxyString; }
AND this snippet...
// launch TurboActivate.exe to get the product key from the user Process TAProcess = new Process { StartInfo = { FileName = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), "TurboActivate.exe"), Arguments = xxxxxxLicensing.GetCustomProxy() }, EnableRaisingEvents = true };
TAProcess.Exited += p_Exited; TAProcess.Start(); TAProcess.WaitForInputIdle(); //Wait for the process to end. TAProcess.WaitForExit();