Screen capture from within ASP.Net

D

dumbledad

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.
 
P

Patrice

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...
 
D

dumbledad

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top