473,395 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Screen capture from within ASP.Net

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
2 6585
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Me Mine | last post by:
i, I have trying to code a small console app that will allow a user to select a window and then create a screen capture of the window. I haven't been able to figure out how to do the screen...
1
by: xc | last post by:
Greetings. I encountered a wield problem when grabing screen images. Sometimes in some computers I can capture the screen, but other times not so. In some computer I cannot capture the screen...
3
by: Per | last post by:
Hi all, This may be a newbie question, but I can't find the answer anywhere. I want to make a capture of the screen, or a part of the screen, that contains the main portion of the form. Detecting...
2
by: Eddie Dunn | last post by:
I have one here that I cannot find anything on in my searching. I am implementing a screen capture functionality into my Visual Basic ..NET application. The code I am using calls the bitblt...
2
by: py | last post by:
I need to take a screen shot of the computer screen. I am trying to use PIL and I saw there is ImageGrab...however it only works on Windows. Is there a platform-independent ability to work...
0
by: Jeffery Tyree | last post by:
I have a machine that will be used to demo some Excel spreadsheets at a convention. Because I did not author the spreadsheets and attendees will be allowed to play with the spreadsheets, I needed...
4
by: gwhite1 | last post by:
I use this code to capture a screen in a regular VB 2005 windows app. It works great! I found the code in google. But when I create a windows service it does not capture the screen. It only...
1
by: JP2006 | last post by:
I'm trying to write a control that will take a screen capture of a particular website when a user submits a form in a web application; one of the form fields is for a URL - the control needs to get...
5
Atran
by: Atran | last post by:
Hello Everyone. In this article: You will know to capture the screen in 2 ways: 1)- Capture full screen. 2)- Capture region. Let's Begin: First make a new Windows Application project. And...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.