Hi All,
I am using the below code to take print screen of my web page.
> using (Bitmap bitmap = new Bitmap(620, 850))
{
using (Graphics g = Graphics.FromIm age(bitmap))
{
g.CopyFromScree n(new Point(bounds.Le ft, bounds.Top), Point.Empty, bounds.Size);
}
bitmap.Save(Sys tem.AppDomain.C urrentDomain.Ba seDirectory.ToS tring() + 1 + ".JPEG", ImageFormat.Jpe g);
}
It works fine in the developement machine,but once i deploy it in the Server
it gives below error
Error Message: The handle is invalid
Source: System.DrawingE rror
Stack Trace: at System.Drawing. Graphics.CopyFr omScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize , CopyPixelOperat ion copyPixelOperat ion)
at System.Drawing. Graphics.CopyFr omScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize )
at System.Drawing. Graphics.CopyFr omScreen(Point upperLeftSource , Point upperLeftDestin ation, Size blockRegionSize )
at Secure_SearchRe port.btnSearch_ Click(Object sender, EventArgs e)
at System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)
at System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument)
at System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument)
at System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String eventArgument)
Its very urgent .Any suggestion please.......
0 1609 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Danny |
last post by:
Does anybody have a nice method of forcing a user to enter a value into a
form using asp?
I think the best is to have a popup when they hit submit that will stay on
the same page and then just alert the user to enter something in so and so
text box.
Thanks in advance
|
by: Not Me |
last post by:
Hi,
What exactly does the above (subject) error mean? I'm getting it from an
adp file when used by a few people at the same time (each user has the
file in their own filespace though). Access is through windows
authentication and it only seemed to occur during an update of a
specific table.. The problem is it didn't happen to everyone and I
can't recreate it at all on my own, so am wondering if it was something
to do with the level of...
|
by: Ed Robichaud |
last post by:
I'm temporarily stumped on how to handle/suppress an error (2501) if a user
cancels sending an email. I'm using DoCmd.SendObject to trigger an Outlook
send window, which works OK, but if the msg is cancelled (not sent) then a
VB runtime error msg appears (#2501) that I would like to either hide or
deal with.
-Ed
|
by: Abby |
last post by:
Hi ... when I run my program, it produces error. I would like to know
how to handle this error message. I don't want to see it on screen.
Any way to just ignore it? Please let me know. Thanks a lot.
c:\>test
5 test 1476 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
2352 test 1476 open_stackdumpfile: Dumping stack trace to
test.exe.s
tackdump
|
by: Ersin Gençtürk |
last post by:
Server : WEB
System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException:
The View State is invalid for this page and might be corrupted.
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadPageViewState()
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)...
| |
by: James |
last post by:
I'm a newbie to vb.net, and classes were something I never played with in
"standard" vb, but...
Basically,part of my program comprises of some tcp/ip stuff, and I used the
following code to start off the connection:
Public Sub Main()
Const PortNumber As Integer = 8022
Dim tcpListener As New TcpListener(PortNumber)
tcpListener.Start()
|
by: Lambda |
last post by:
When I call the standard strncpy function, I provide it a negative
argument,
such as:
strncpy(s, ct, -1)
I compile the code with gcc, when I run, it says "Segmentation fault".
Do you think it's ok? I try this to see how the library handle invalid
parameter.
|
by: Chetana |
last post by:
Hi All,
I have one asp.net application in which connection gets expired after
some time on my server actually i m thinking on how the connection
gets removed because after some time I m getting error as
Can't find table
which gets after some time automatically .
|
by: jwan142 |
last post by:
GOOOOD DAY. Geeks
This is my first post and I do not know whether my title makes sense to you.
Here is the problem..
I have a Access database. There is a table contains two fields called Latitude and Longitude which are stored as numerical coordinate, Number (Double, decimal).
Based on this table, i crated a form to fill in these two values.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |