|
If it always happens when your app is started from the third-party app and never happens when your app is started directly, then I would not think it's a general problem. If it were then you would see the issue when the third-party app is not launching your app.
If this is only happening on that single box (regardless of how it was launched), then I would agree that it was a problem with the machine.
Even when launched from the third-party app, does it always take 8 seconds to execute? Are there other instances of BeginInvoke that are used?
Have you tried using perfmon (Performance Monitor) to see if your application is starving the ThreadPool? Also, can try logging the number of available threads[^]?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hooray, at least I got a clue.
Today I got a chance to look at the machine in question and found out the reason for the delay. It was not machine-related, was not thread-pool related and could be reproduced on another machine.
The reason was/is the way the third-party app is calling our program.
They are calling ShellExecute() and then immediately enter a busy wait for 10 seconds waiting for a response file from us.
Once the timeout occurred, operation of the other app went back to normal (i.e. not cluttering the processor with busy waits) and our app finally got started.
Strangely enough, as soon as I lowered the third party app's priority, the call did come through and operation was almost normal.
I'll have to investigate further because I could then reproduce the effect with a little test application, but not if I called notepad instead of our app. Notepad opened reasonably fast. A hello world WinForms-app also took veeeery long to start up under these conditions.
But at least now I got something to work on...
Thanks for your suggestions!
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi
I m facing exception while saving an image. The code is
//this line throws Exception
picturebox.Image.Save(memorystream, System.Drawing.Imaging.ImageFormat.Jpeg );
and exception is:
"A generic error occurred in GDI+."
So plz tell me the solution
Regards
Shanzay
|
|
|
|
|
My guess is that there is something up with the memory stream.
Try saving the image to a file (by passing a string) instead of a stream. If the error still occurs, then it must be a problem with the image.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Hi,
almost all errors occuring in GDI+ lead to the same message, so it can be many things.
Most liekly in your case: you have forgotten to reposition the stream, if you write data
to a stream, its position advances; now if you want to save the image, you need to
set the position to zero again. Try memorystream.Position=0 before Image.Save
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi,
Thanx for reply.
I did this but still getting this error.Actually I m sending Live video from server to client and after recieving every frame this error is displaying so what should I do in this Scenario.
Shanzay
|
|
|
|
|
did you succeed in saving to a file as the other reply suggested?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
yah well I got success by adding two things
1. used thread.Sleep() before saving
2. used file.jpg instead memorystream.
Thanx.
Shanzay
|
|
|
|
|
I am developing a windows application and reqiure to make POPUP Window when my application is minimized to show message what ever i want.
|
|
|
|
|
Dear dikshant,
You have to have an windows form ready as a POP UP window ...
Once you have the form ready ...
you have create an object of that form class and need to call show method of the form class object ..
here is the pseudo code for that .....
frmPopup _fPopup=new frmPopup()
_fPopup.show();
hope it helps !! :->
Thanks,
Arindam D Tewary
|
|
|
|
|
What kind of pop up window do you want ??
|
|
|
|
|
You really were patient enough to wait 9 minutes before asking the same question again?
Great.
But I think you were missing the word "URGENT" in your requests.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
A MessageBox?
If I have understood your question, all you need is MessageBox on the right event.
Something like this:
MessageBox.Show("Your message.", "Caption");
Is this helping?
|
|
|
|
|
Hello I am developing Windows application required to make a POPUP Window when application Minimized so how can i make that popup window.
|
|
|
|
|
|
dikshant@p-dd.com wrote:
Hello I am developing Windows application required to make a POPUP Window when application Minimized so how can i make that popup window.
Don't ask the same question twice within 9 minutes of each other. Be patient and someone will respond.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi frns
i have one dropdown list,button and a grid view in my proj i have filled dropdown list with my database tables values as select items now i want to display in the details of item1 column values in grid view when i select item1 in dropdown list and click on button
plz send me asnwers as early as possible
regards
sunil
|
|
|
|
|
Following is the pseudocode that you can use for your purpose !!!
In the button click event ...
public void button1_Click(object sender,EventArgs e)
{
string _strSelectedID=cboValues.SelectedItem.Value;
_dgrYourDataGridName.DataSource = GetItemDetails(_strSelectedID)
_dgrYourDataGridName.databind() // this line is needed ONLY in case of your application is an Web Application.
}
public DataTable GetItemDetails(string ItemID)
{
// Get the the details of data grid depending upon the ItemID( it is the value of drop down selected item ) and get it as a DataTable ...
_dTItemDetails = DataBaseValues(...)
return _dTItemDetails
}
Happy Coding !!
Thanks,
Arindam D Tewary
|
|
|
|
|
under button clickevent what is cbovalues can u plz tell me
send answer as early as possible
|
|
|
|
|
hi,
my aim is to open a mdi child form which cant be dragged that is storing the positions and other size related properties permanently
if any one knows the answer or any clue please let me know
regards
sindhu tiwari
if i fail 100 times i will never call myself a failure i will tell that i have discovered 100 ways to fail
|
|
|
|
|
The simplest way to stop a form being dragged (moved) around by the user is to set the FormBorderStyle property to None for the Form you are making the MDI Child. Using None as the FormBorderStyle will also prevent the user from resizing the Form.
However this will remove the control bar at the top of the Form, if you can live with that and in order to close the form, you will need to provide a button which closes it.
|
|
|
|
|
hi all,
please do you have any idea to host .net console network server applicatioin inside IIS.May be i am wrong.
if feasible,please give me some useful references.
thank you in advance.
naresh is testing the site.
|
|
|
|
|
dhami_naresh wrote: please do you have any idea to host .net console network server applicatioin inside IIS
IIS is for executing server side scripts. Console application can't be executed by IIS
|
|
|
|
|
oh thank you.
naresh is testing the site.
|
|
|
|
|
hi
can we use TCPChannel in dll that is hosting in IIS.
thank you.
naresh is testing the site.
|
|
|
|