Hi there,

I have a windows control embedded in a web page using the <object>
tag. The control sometimes needs to access an aspx page using
HttpWebRequest/Response (aspx page is located on the same web server
that the .dll file is located in).

This works perfectly when the client is not connecting through a proxy
server. When the client is connected to the web via a proxy server,
myHttpWebRequest.GetResponse() would fail with a 407 Authentication
Required.

I realize that any HttpWebRequest object has a Proxy property, but
whenever I tried to access it I got a SecurityException (Request for
type WebPermission failed). So to temporarily get past this problem, I
gave the dll FullTrust for my computer. Now no exception is thrown
when I try to access the Proxy property.

New problem. I got the proxy information using GetDefaultProxy(). It
is able to grab the address for the proxy server because I was able to
do MessageBox.Show(proxyObject.Address.ToString()).

So I *assume* I have the proxy information. However, when I try to do
a myHttpWebRequest.GetResponse(), I still get a 407 Authorization
required error. There does not seem to be any login/password for the
proxy server... or if there is, I don't know how to find it.

So is the cause of the problem because the proxy server thinks that
whatever is running the dll (I assume the JIT compiler or whatever) is
trying to access the proxy server? Or if not, what is the problem and
how do I go about fixing it?

Thanks,

Wendy