Server certificate validation <-> UnmanageCode permission

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Diego Rivero

    Server certificate validation <-> UnmanageCode permission

    Hi.



    I'm writing a web control that inherits from
    "System.Windows .Forms.UserCont rol" and uses SSL protocol to communicate with
    the web server. The only way I've found to validate the server certificates
    is using the "CertificatePol icy" static property of the class
    "ServicePointMa nager". The problem is that to use that property my code
    needs "UnmanagedC ode SecurityPermiss ion" 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 "UnmanagedC ode SecurityPermiss ion" to set that property?

    and more important,

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



    Thanks,

    Diego Rivero.


Working...