求助:CLR错误!
在CLR 自定义标量函数GetFile_Str16
程序集权限:PERMISSION_SET =EXTERNAL_ACCESS
执行出错!
消息 6522,级别 16,状态 2,第 3 行
在执行用户定义例程或聚合 "GetFile_Str16" 期间出现 .NET Framework 错误:
System.Security.HostProtectionException: 试图执行 CLR 主机禁止的操作。
受保护的资源(只有完全信任才可访问)是: All
要求的资源是: Synchronization
System.Security.HostProtectionException:
在 System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags)
在 System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
在 System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
在 System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData)
在 System.Diagnostics.TypedElement.BaseGetRuntimeObject()
在 System.Diagnostics.ListenerElement.GetRuntimeObject()
在 System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
在 System.Diagnostics.TraceInternal.get_Listeners()
在 System.Diagnostics.TraceInternal.WriteLine(String message)
在 SqlServerInPutFile.UserDefinedFunctions.GetFile_Str16(SqlString PathFile)
。