-1

I need to capture client screen so i reffered http://www.csharphelp.com/2006/11/capturing-the-screen-image-using-c/

its working fine on local but on server my image is saving as blank image

    System.Drawing.Bitmap outputImage  = CaptureScreen.CaptureScreen.GetDesktopImage();
    string path = HttpContext.Current.Server.MapPath("~/" + "Corporate/testimages/ab1.png");

    outputImage.Save(path);

help me out thanks in advance...

Kratika Sharma
  • 291
  • 1
  • 5
  • 16

1 Answers1

0

I think the problem is, that your application is running by an user without a desktop environment. There are detected Windows Users for something like Web Applications and this user doesn't have an screen.

You should think about extracting the Screening process in a separate program.

EDIT: Kratika doesn't want to screen the clients screen, (s)he wants to screen an other website and provide the download link.

Alex H
  • 1,424
  • 1
  • 11
  • 25
  • What kind of Link?!? How to separate a program? Just make a console application. – Alex H Jul 03 '15 at 07:44
  • @KratikaSharma Sharma Please take a look at this answer: http://stackoverflow.com/a/5731360/4021938 – Alex H Jul 03 '15 at 07:47
  • actually i need to take screen shot of client screen on buttonclick in my website i cant use console application – Kratika Sharma Jul 03 '15 at 07:48
  • @KratikaSharma This is not possible. Browsers will not take screenshots for you. Than you have to write a program, which gets executed on the clients computer. The user has to download this program and execute it. Your code gets executed on the server and you are getting the screen of the server. – Alex H Jul 03 '15 at 07:50
  • is there any alternative of grabz.it currently m using it but its to slow and i want to make this process fast – Kratika Sharma Jul 03 '15 at 07:55
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/82267/discussion-between-kratika-sharma-and-alex-h). – Kratika Sharma Jul 03 '15 at 07:56