Is there a way to use System.Drawing in a webservice in ASP.NET?
I have a project were i need to read some "secret values" from a database, and print those values on a card. I was trying use GDI do write the values on card image, but asp.net does't allow me to use System.Drawing. Any suggestion?
Thanks
EDIT开发者_如何学Python: In the MSDN page says: "Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. For a supported alternative, see Windows Imaging Components."
You need to add a reference to System.Drawing.dll
If this is for the MDX you should probably need to install the SDK. Alternatively browse the DLL manually.
You can use System.Drawing, but you may encounter problems is the general message. This may offer more help:
http://blogs.msdn.com/b/tom/archive/2008/03/19/gdi-gdiplus-and-asp-net.aspx
Can you post some code so we might see where the error is occurring?
精彩评论