Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/340.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 有没有办法在ASP.NET的Web服务中使用System.Drawing?_C#_Asp.net_Web Services_System.drawing - Fatal编程技术网

C# 有没有办法在ASP.NET的Web服务中使用System.Drawing?

C# 有没有办法在ASP.NET的Web服务中使用System.Drawing?,c#,asp.net,web-services,system.drawing,C#,Asp.net,Web Services,System.drawing,我有一个项目,我需要从数据库中读取一些“秘密值”,并将这些值打印在卡片上。我尝试使用GDI在卡片图像上写入值,但asp.net不允许我使用System.Drawing。有什么建议吗 谢谢 编辑:在MSDN页面中显示: Windows或ASP.NET服务中不支持使用System.Drawing命名空间中的类。试图从这些应用程序类型中使用这些类可能会产生意外问题,例如服务性能降低和运行时异常。有关支持的替代方法,请参阅Windows Imaging Components您需要添加对System.Dr

我有一个项目,我需要从数据库中读取一些“秘密值”,并将这些值打印在卡片上。我尝试使用GDI在卡片图像上写入值,但asp.net不允许我使用System.Drawing。有什么建议吗

谢谢

编辑:在MSDN页面中显示:
Windows或ASP.NET服务中不支持使用System.Drawing命名空间中的类。试图从这些应用程序类型中使用这些类可能会产生意外问题,例如服务性能降低和运行时异常。有关支持的替代方法,请参阅Windows Imaging Components您需要添加对System.Drawing.dll的引用


如果这是针对MDX的,您可能需要安装SDK。
或者手动浏览DLL。

您可以使用System.Drawing,但您可能会遇到的问题是一般信息。这可能会提供更多帮助:


您可以发布一些代码以便我们看到错误发生的位置吗?

您应该能够使用
系统。Drawing
很好,我用它在我的应用程序中绘制热图。不起作用,visual studio不断抱怨“C:\..\Service2.asmx.cs(11):类或命名空间“System”中不存在类型或命名空间名称“Drawing”(您是否缺少程序集引用?“@luistm您能提供一些代码吗?另外,您能列出您的using语句吗?代码正在工作,但当我将其添加到webservice文件并包含“using System.Drawing;”它给出了上述错误。My using语句:using System;using System.ComponentModel;using System.Data;using System.Threading;using System.Web.Mail;using System.Web.Services;using System.Data.SqlClient;using System.Data.SqlTypes;using System.Configuration;using System.IO;using System.Drawing;@luistm您确定是usi吗是否有System.Drawing.dll的正确版本?请检查所引用程序集的路径(在我发布的图像中,您可以向右滚动并查看路径)