Server certificate validation <-> UnmanageCode permission

D

Diego Rivero

Hi.



I'm writing a web control that inherits from
"System.Windows.Forms.UserControl" and uses SSL protocol to communicate with
the web server. The only way I've found to validate the server certificates
is using the "CertificatePolicy" static property of the class
"ServicePointManager". The problem is that to use that property my code
needs "UnmanagedCode SecurityPermission" and that would be an important
drawback if I want my web control to be used over the Internet from any
client machine.



The questions are:

- Why do I need "UnmanagedCode SecurityPermission" to set that property?

and more important,

- There is any way to avoid the need of it?



Thanks,

Diego Rivero.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top