A generic error occurred in GDI+ error when taking a screenshot
<p>The code I have written is below, and I get this error:</p>

<p><code>A generic error occurred in GDI+</code></p>

<pre><code>protected void btnSave_Click(object sender, EventArgs e)
{
    Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);

    Graphics graphics = Graphics.FromImage(bitmap as System.Drawing.Image);

    graphics.CopyFromScreen(100, 0, 0, 0, bitmap.Size);


    bitmap.Save("@file.bmp");
}
</code></pre>
