Hello everybody..
I have started to "experiment" the CLR within SQL Server 2005.
I have to say that sometimes it's very handy ans sometimes very "complicated".
I got a problem, I have understood why and how to solve it.
I created a TV function that takes a CSV file so something on the data and retrieve a table as I need.
when I select the function I get this error:
A .NET Framework error occurred during execution of user defined routine or aggregate 'XXXXXXXXXXX':
System.Security.HostProtectionException: Attempted to perform an operation that was forbidden by the CLR host.
The protected resources (only available with full trust) were: All
The demanded resources were: UI
System.Security.HostProtectionException:
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
at DLLname.XXXXX
My project has the properties:
->Database Permission Level: External (because the function accesses an external resource)
->Signing I have signed the assembly and I have created a strong name key file
Somebody can help me
thankx
Marina B.