Hi William,
Regarding on this issue, you may assert all permission required by the
application first in the main sub. For exmaple, if the application will
open a file:
Dim fileIOPerm1 As New FileIOPermission(FileIOPermissionAccess.AllAccess,
"C:\testio.txt")
Try
fileIOPerm1.Assert()
Catch ex As Security.SecurityException
Console.WriteLine(ex.Message)
End Try
If the assembly didn't have the permission, a exception will be generated
and this exception can be caught by the try statement.
Luke
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)