By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,496 Members | 1,528 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,496 IT Pros & Developers. It's quick & easy.

Screen capture from within ASP.Net

P: n/a
Hi All,

I'm using ASP.Net web services to provide the logic required for a
Flash based prototype. The Flash and the ASP .Net run together on the
client machine. One of the functions I'd like to offer is

[WebMethod]
public void StoreLogEntry(string tag, string description, bool
screenshotRequired)

The Flash can call this when the user (our trialists) perfom
interesting actions. The screenshot captured then helps us jog
trialist's memory when we interview them.

To do the screen capture I'm using the CodeProject code from
http://www.codeproject.com/csharp/csCaptureScreen1.asp that wraps the
native gdi32.dll and user32.dll calls in an easy to use way.

The screen capture works well in the demo application, but when the
same functions are called from within ASP the resulting jpg is just
black.

I've tried using inpersonation thinking it was an OS priveledges
problem but that didn't work. Any idea what I'd have to do so that
ASP.Net C# could take a screen capture from the screen of the PC that
IIS is running it on.

Thanks,

Tim.

Oct 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Where do you run this code ? Keep in mind that the screen you want is client
side so if you run the code server side it won't help (when you say that
"ASP.NET runs on the client machine" I assume you meant "the HTML page
created on the server by ASP.NET ""runs"" on the client machine" ?)

Not familiar with Flash but IMO your best would be to this from Flash if
this feature is available (it could perhaps capture its own screen).

Not sure what you tried but another option could be to try to save just the
"state" of the application (for example the size, location of shapes) when
needed and to rebuild the "screen" the user sees from this information.

If allowed it would be a security issue (what if you do a full screen
capture with sensitive information).

The last resort would require installing something client side to allow
this...

--
Patrice

<du*******@gmail.coma écrit dans le message de news:
11**********************@h48g2000cwc.googlegroups. com...
Hi All,

I'm using ASP.Net web services to provide the logic required for a
Flash based prototype. The Flash and the ASP .Net run together on the
client machine. One of the functions I'd like to offer is

[WebMethod]
public void StoreLogEntry(string tag, string description, bool
screenshotRequired)

The Flash can call this when the user (our trialists) perfom
interesting actions. The screenshot captured then helps us jog
trialist's memory when we interview them.

To do the screen capture I'm using the CodeProject code from
http://www.codeproject.com/csharp/csCaptureScreen1.asp that wraps the
native gdi32.dll and user32.dll calls in an easy to use way.

The screen capture works well in the demo application, but when the
same functions are called from within ASP the resulting jpg is just
black.

I've tried using inpersonation thinking it was an OS priveledges
problem but that didn't work. Any idea what I'd have to do so that
ASP.Net C# could take a screen capture from the screen of the PC that
IIS is running it on.

Thanks,

Tim.

Oct 11 '06 #2

P: n/a
Thanks Patrice but no, in this case the server and the client are the
same machine. Much of the functionality is done in C# and exposed
through ASP .Net web-services (not web pages) which the Flash then
invokes and consumes through calls of the sort
http://localhost/Voicemails/Service.asmx?wsdl

So the 'server' side ASP code *is* running on the client machine (the
client and server are the same box so the terms don't really make sense
here). And hence the ASP code *should* be able to generate a screen
capture. As far as I know Flash ActionScript cannot screen capture, in
fact sand-boxing makes its interactions with the client OS quite
limited.

Why can I create a screen capture within a .Net Framework windows
application, while the same code generates an entirely black jpeg when
run under ASP?

Cheers,

Tim.

Oct 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.