Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SecurityException when calling WebProxy.GetDefaultProxy()?

Status
Not open for further replies.

theweirdo

Programmer
Aug 7, 2002
17
CA
Hi there,

I have a user control embedded into an aspx page. In this control I'm trying to get a WebProxy object by using WebProxy.GetDefaultProxy()... However, I am getting an "Request for permission of the type System.Net.WebPermission...failed". Anyone know why? I have created an instance of WebPermission using new WebPermission(PermissionState.Unrestricted). I have also tried creating an instance of WebPermission and then adding the address of the proxy server to the list by using wp.AddPermission(NetworkAccess.Connect, " same error.

Anyone know how I can fix this problem?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top