Hi guys,
I have an ActiveX/ control created in C# embedded for use in Internet Explorer. It does a httpWebrequest in the background. Everything was working fine until it came across a pilot site that is sitting behind a proxy server that requires authentication and is now coming up with the below. I see from the logs that the control is being seen as anonymous and is being denied internet access.
"(407) Unable to authenticate through proxy"
Now I've seen a lot of examples that suggest using CredentialCache.DefaultCredentials to allow your app the authentication of the logged on user. However, when I attempt to use this (see code below), at runtime I am getting.:-
"Request for the permission of type 'System.Security.Permissions.EnvironmentPermission,mscorlib, Version2.0.0.0, Culture=neutral, PublicKeyToken=xxxx' failed"
I am running .NET2.0 and .NET1.1 and have my own site group policy I am using. I thought it might need "Environment Variables" access, but still didn't work when I added this (nor when I have added everything for access!)
This new code is only in my environment at the moment (haven't deployed to test it at pilot site). Could it be this code will not work because my proxy doesn't require authentication? Would this extra code snippet run ok for home users NOT using a proxy?
I really hope someone can help me or suggest an alternative to get this thing through any proxy authentications encountered.
Thanks in advance
=============================
try