473,657 Members | 2,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(s tring tag, string description, bool
screenshotRequi red)

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 6617
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*******@gmai l.coma écrit dans le message de news:
11************* *********@h48g2 00...legr oups.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(s tring tag, string description, bool
screenshotRequi red)

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
13500
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 capture part. The code is as follows, the commented out lines at the end are things I have tried, but don't work. Whenever I try to create a compatibe Bitmap or DC it comes back with an error as win32ui: CreateCompatibleDC failed
1
2957
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 image, but when I change its color bits, say from 32bits to 24 or 16bits, the program can capture the image. Can anyone kindly examine my following code, and point out the flaw:
3
2210
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 the screen that contain the main portion of the form is pretty straight forward, but how do I capture what I need in an Image object? Another thing, how do you make the program move the mouse pointer and simulate clicks? Best regards
2
2211
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 function in gdi32.dll to achieve its magic as follows: Public Function CreateScreenshot() As Bitmap
2
2408
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 around this? thanks
0
3271
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 a way to periodically restore the original versions. In addition to the "always-on-top click this button to reset demo" application I wrote, I chose to use screen saver code to reset the demo after a period of inactivity in the event an attendee...
4
5366
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 captures a blank graphic. Does anyone know why it will not capture the current screen? Is something not available when running as a service? Thanks!!! Sheila Function CreateScreenshot() As System.Drawing.Bitmap Dim Rect As System.Drawing.Rectangle =...
1
4494
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 an image of that web site so that it can be displayed later as a thumbnail image. I have code for taking a normal screen capture using GDI+ which works fine. What I am now trying to do is to modify it so the screen capture is of a remote...
5
9007
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 make sure your program uses these namespaces: using System;
0
8425
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8845
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7355
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5647
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2745
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.