andrewsc
Member
Hi,
my little console utility works perfectly from C: drive. It connects first to Sql Server, and then reads and writes a few files. The same utility fails when I place the assembly file on a shared disk drive.
Code Access Security makes an interesting reading, but not when I need to make it happen in the next hour or so. Is there any simple command which I can compile into the source, to make it work on shared drives as well ?
The funny thing is that the failure is on the SqlConnectipen() call. The error message says the "request for permission SqlClientPermission failed". From my summary reading, I would have expected FileIOPermission to depend on the disk location. But SqlClientPermission ?
On the other hand, I will need to address permissions for file I/O as well, because that is the next thing my programm does, after connecting to SQL Server.
Being in a hurry, Ive tried declarative security:
<assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name := "FullTrust")>
The above came back at runtime with an error saying the permission could not be acquired.
Any other quick-fix idea ?
Meanwhile I will keep reading on.
TIA,
Andrew
my little console utility works perfectly from C: drive. It connects first to Sql Server, and then reads and writes a few files. The same utility fails when I place the assembly file on a shared disk drive.
Code Access Security makes an interesting reading, but not when I need to make it happen in the next hour or so. Is there any simple command which I can compile into the source, to make it work on shared drives as well ?
The funny thing is that the failure is on the SqlConnectipen() call. The error message says the "request for permission SqlClientPermission failed". From my summary reading, I would have expected FileIOPermission to depend on the disk location. But SqlClientPermission ?
On the other hand, I will need to address permissions for file I/O as well, because that is the next thing my programm does, after connecting to SQL Server.
Being in a hurry, Ive tried declarative security:
<assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name := "FullTrust")>
The above came back at runtime with an error saying the permission could not be acquired.
Any other quick-fix idea ?
Meanwhile I will keep reading on.
TIA,
Andrew