开发者

How do I capture a web applications screen to attach to an e-mail on error?

I am working on a web application and we would like to capture the screen (either the applications current screen or the whole screen) and attach this to an e-mail that is automatically generated for error messages. I've seen a few posts about how to do this in a winform app, but nothing really on how to do it in a web app. Is it the same process? Any sites that have helpful steps on how to achieve this in a web app are appreciated.

EDIT: Is it possible for us to achieve something similar with screen scraping? I'm not too familiar with what all can be done with a scree开发者_C百科n scrape so any suggestions are also welcomed.


There's no screen in a web application. You have to do this on the client machine, who has a browser capable of transforming the HTML to some interface worth capturing.

What you could do in your web application is to register for the Application_Error event in global.asax and send an email for each exception.


instead of such screen shot, using Server.GetLastError() to capture the error and sending to admins has more meaning


Not much of a .NET guy but, there should be some way to get the Response object in your exception catching code and then include a serialized representation of it in your email. Things like headers and session variables are also useful, FWIW...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜