0
您好,我尝试通过使用CLR集成访问从SQL Server的外部EXE。System.Security.SecurityException:请求失败
我把我的数据库TRUSTWORTHY ON
和PERMISSION_SET = EXTERNAL_ACCESS
但我得到以下错误
Msg 6522, Level 16, State 1, Procedure hello, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'hello':
System.Security.SecurityException: Request failed.
System.Security.SecurityException:
at HelloWorldProc.HelloWorld()
helloworld.cs代码:
using System;
using System.Data;
using Microsoft.SqlServer.Server;
using System.Data.SqlTypes;
using System.Diagnostics;
public class HelloWorldProc
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void HelloWorld()
{
SqlContext.Pipe.Send("Hello world!\n");
Process.Start(@"D:\Raja\trg.exe");
}
}
它的工作正常。 –