我有这个C#程序,其中一直使用Sql Server(Developer)。在调试时我得到46个警告,没有文件名或行号,只是警告:
严重性 代码 描述 项目 文件 线 抑制状态 警告 参考'Microsoft.SqlServer.Diagnostics.Strace' 不允许部分信任的来电者。
这是什么?
谢谢, - MyCatAlex
解决方案
你好,
它看起来你正在使用强大的命名程序集。
你可以尝试 [ assembly:AllowPartiallyTrustedCallers ] 属性
docs.microsoft/en-us/ sql / reporting-services / custom-assemblies / using-strong-named-custom-assemblies?view = sql-server-2017
I have this C# program where Sql Server (Developer) is used all the time. On debug I got 46 warnings, no file name or line number, just warnings:
Severity Code Description Project File Line Suppression State Warning Reference 'Microsoft.SqlServer.Diagnostics.Strace' does not allow partially trusted callers.
What is this?
Thanks, - MyCatAlex
解决方案Hi there,
It looks like you're using a strong named assembly.
you can try the [assembly:AllowPartiallyTrustedCallers] attribute
docs.microsoft/en-us/sql/reporting-services/custom-assemblies/using-strong-named-custom-assemblies?view=sql-server-2017
更多推荐
c#程序中的SQL Server警告
发布评论