I am trying to tag an assembly with a minimum requirements check so that it
will know if it has the ability to read and write to a specific folder.
The problem is that the specific folder is a sub folder of the users
ApplicationData folder.
Anyone have any examples of how to do this? I have been looking in the help
and Googling for the last few hours and can't seem to find an example of
this.
I set up a small test project that uses the following line to check before
it draws the main form:
<Assembly:
Security.Permissions.FileIOPermission(Security.Per missions.SecurityAction.RequestMinimum,
All:=Nothing, Append:=Nothing, PathDiscovery:=Nothing, Read:="C:\Documents
and Settings\rcassick\Application Data\Enterprocity", Unrestricted:=False,
Write:="C:\Documents and Settings\rcassick\Application Data\Enterprocity")>
and then I ran it from an account that I KNOW has no ability to read or
write form that path and it did not seem to do anything at all. I was
expecting at least to get some Security Exception window.
--
Raymond R Cassick
CEO / CSA
Enterprocity Inc.
www.enterprocity.com
3380 Sheridan Drive, #143
Amherst, NY 14227
V: 716-316-5973
Blog: http://spaces.msn.com/members/rcassick/