c#程序中的SQL Server警告 [英] A SQL Server warning in c# program

查看:109
本文介绍了c#程序中的SQL Server警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个C#程序,其中一直使用Sql Server(Developer)。在调试时我得到46个警告,没有文件名或行号,只是警告:


严重性    代码    描述    项目    文件    线    抑制状态

警告        参考'Microsoft.SqlServer.Diagnostics.Strace'
不允许部分信任的来电者。          



这是什么?


谢谢, - MyCatAlex


解决方案

你好,


它看起来你正在使用强大的命名程序集。 


你可以尝试
[
assembly:AllowPartiallyTrustedCallers ]
属性 


https://docs.microsoft.com/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 

https://docs.microsoft.com/en-us/sql/reporting-services/custom-assemblies/using-strong-named-custom-assemblies?view=sql-server-2017



这篇关于c#程序中的SQL Server警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆