c#程序中的SQL Server警告

编程入门 行业动态 更新时间:2024-10-28 12:25:08
本文介绍了c#程序中的SQL Server警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有这个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警告

本文发布于:2023-11-07 22:17:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567585.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   SQL   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!