I have set my Internet Explorer proxy using the following code.
RegistryKey RegKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);
RegKey.SetValue("ProxyServer", "proxyserver");
RegKey.SetValue("ProxyEnable", 1);
RegKey.SetValue("ProxyOverride", "domains;<local>", RegistryValueKind.String);
After running this code I can see that the proxy server name available in Internet Explorer's proxy setting. But when I hit the webpage in my test environment I can't see it. I found very weird behavior of Internet Explorer that after setting the proxy through this code I need to click the OK button in LAN setting and then hit the webpage I can see it properly.
I have searched for it for 4-5 hours and now very much confused with this. Any help will be greatly appreciated.