Screen capture from within ASP.Net

Discussion in 'ASP .Net' started by dumbledad@gmail.com, Oct 11, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. Patrice Guest

    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

    <> a écrit dans le message de news:
    ...
    > 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.
    >
    Patrice, Oct 11, 2006
    #2
    1. Advertising

  3. Guest

    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, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VGVycnlXaWxzb25AdGVjaC5jb20=?=

    Want screen capture of server desktop

    =?Utf-8?B?VGVycnlXaWxzb25AdGVjaC5jb20=?=, Apr 5, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    2,278
    Bruno Sirianni
    Apr 6, 2004
  2. D Sheldon

    ASP.Net screen capture method

    D Sheldon, Jun 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,891
    anchamparuthi
    Jul 6, 2006
  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: ASP.Net screen capture method

    Phil Winstanley [Microsoft MVP ASP.NET], Jun 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    636
    Phil Winstanley [Microsoft MVP ASP.NET]
    Jun 24, 2004
  4. Fabio R.

    url screen capture

    Fabio R., Feb 25, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    684
    Fabio R.
    Feb 25, 2005
  5. Max
    Replies:
    7
    Views:
    9,098
Loading...

Share This Page