开发者

ASP.NET MVC: System.Drawing not supported

What I'm trying to

I'm trying to let a user enter the name of a website in a textbox and click on a button. When the button has been clicked the website URL should be sent to a method which will use a WebBrowser to navigate to the website and take a screenshot of it. Further it should afterwards grab this screenshot and generate a thumbnail of it.

..开发者_StackOverflow社区. And the tricky part

The tricky thing is that according to MSDN the System.Drawing should not be used in neither Windows or ASP.NET services, which leaves me with 2 approaches:

  • Ignore the suggestion from MSDN and implement the class which contains the necessary methods.
  • Create a WCF Service with the necessary methods.

The second approach sounds to me that it almost violates the suggestion on MSDN anyway since I implement it in a ASP.NET MVC (connecting to the WCF Host)

Any suggestions?


The documentation indeed has this warning, however, thousands of developers on thousands of sites have used the classes in the System.Drawing namespace without much issue.

See this other SO question exactly about this issue, and this one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜