How to grant FileIOPermission to assembly running under SQL Server ?

  • Thread starter Thread starter Oleg Subachev
  • Start date Start date
O

Oleg Subachev

I try to write some info to file in the CLR Trigger under SQL Server 2005.

But I get the following error:
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

How can I grant FileIOPermission to my assembly running under SQL Server ?

Oleg Subachev
 
Oleg Subachev said:
I try to write some info to file in the CLR Trigger under SQL Server 2005.

But I get the following error:
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

How can I grant FileIOPermission to my assembly running under SQL Server ?

When installing the assembly into the server (with CREATE ASSEMBLY...),
add the clause "...WITH PERMISSION_SET=EXTERNAL ACCESS".
 
Back
Top