简体   繁体   中英

bitmap image saving as blank image

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM