Hi Cadel,
Thanks for your feedback.
Yes, I see your concern. However, this is the default CAS setting of any
machine installed .Net Framework. That is, defaultly, .Net does not trust
the Sql operation of network shared application. We have to explicit tell
the .Net to trust our application.
Because our Winform application runs with .Net code, we can not use .Net
code to config the CAS settings, or this will become a security hole.
Currently, I think we have 2 options:
1. Manually config all the client machines to trust our network shared
application
2. First use a bootstrapper unmanaged application to config the .Net
settings to trust our winform application. Then invoke our Winform
application to run.
For #2, to config the .Net settings, we can use CreateProcess API(or other
shell api) to invoke Caspol.exe to do the configuration. Caspol.exe is the
command line tool of .Net Security configuration snap-in. For more
information, please refer to the links below:
"Code Access Security Policy-Tool (Caspol.exe)"
http://msdn.microsoft.com/library/de.../deu/cptools/h
tml/cpgrfCodeAccessSecurityPolicyUtilityCaspolexe.asp
"Using CasPol to Fully Trust a Share"
http://blogs.msdn.com/shawnfa/archiv...30/344554.aspx
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.