|
Hello,
I have implemented a webservice by using websphere. an c# client calls this service successfull, however it always gives a timeout in the second call. The first, third, fourth call etc.. are alway successfull but the second fails all the time (timeout). Monitoring the servlet on the websphere side shows that there is no incoming traffic from the second c# call.
I tried both ways (synchrone-call and the asynchronious variant) but the second call always causes a time-out.
the .jsp testpage (generated by the websphere environment) works fine all the time, so the suspecion points to c#
who has an idea what can cause the trouble.
thanks in advance
leon van rooijen
|
|
|
|
|
I've created an application that uses panels with images as background having a pretty good looking application at the place of the normal windows xp style...
But when i resize it, or i wait to see it ended to load on start, or in all the other time that it is called on paint event, i see flicker the panels that uses images as background.
Sometime i see it all black before fully end to draw the image or i see just the border.
Why? How can i avoid it? (i use double buffer too)
|
|
|
|
|
Ok, I have the following problem. A function is called asyncronously in the program, and someone told me that is done in a new Thread. Inside the function I want to open a new form but it crashes when I try. So i decided I have to open the form in the main thread. Can anyone please tell me how can I do just that? Thank you.
|
|
|
|
|
Use Form.Invoke to call a control method outside the thread where it was created. You have to know how to work with delegates to do that.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Thank you verry much
|
|
|
|
|
|
If you include the reference to Word in the project, all your project will generate is an interop file for Word. You won't need a license for that. To be able to use Word on a target installation machine, the machine must have Word already installed. So I don't think you will have any licencing issue. Also, I don't think your operations on Word (in the application) will work if the target machine does not have MS Word already installed.
There has to be more to life than just this
|
|
|
|
|
Hello every one
After 2 hard week of work, finally i accomplished an reliable server and client classes which look like the VB Winsock, those 2 classes are reliable, also server enable multiple connections, as i test it accept 5000 connection and Handel them,
When i try to create an demo app. on these 2 powerful classes, all goes fine, i faced an problem in sending files, as I'm using one channel only between server and client, i.e. each client have only one channel, this channel Handel both data and commands, we can distinguished between them, that command will always contain [#<cmd>#] tag before the command itself, so in the OnDataReceived event, we convert the byte array to ASCII string to search inside it, if we find the prev. tag then this a command else we just use that array to put on file or something, the logic is tested before on my prev. vb6 app.
Here an scenario of connection,
1- Client connected to server, server add its info to listview,
2- Server request from client to capture desktop screen
3- Client receive the command and capture the image convert it to JPEG, and then add to that array the following tag at the end of array [#<eof>#], which help us to detect the end of file.
4- Client tell the server that it ready to send, given to server the length of image array without the length of tag,
5- When server receive readytosend, it the client socket info to helper class which contain the socket id, image size, and memory stream, which contain image chunks,
6- then Server send the client an message ready to receive, in this moment client start sending data chunks in order of 1024 Byte per time,
7- Every time server receive data it check if its EOF or not, if its, remove the EOF tag, and all nulls, and write the last chunk to the image,
The problem is the image in coming deformed, also some times length of incoming data become greater than length saved from client in early steps, i.e. an **** on line collected while getting data,
After hard work, i try to put an execution delayer, using Thread.Sleep(0), and the surprise that its finally work, and the image size is correctly, and image is nice, But all this in LAN, when test app on Wan all goes bad again, i think the problem not the delay, but delay here prevent some bad thing to happen, i want to know why server put extra data on the image stream, from where these extra data come, Am I Missing Something.?!?!?!??!?!?!?
All i need, Any one test this code, its amazing, very exciting and commented, will learn you a lot, all i need is to detect the reason of that bugs,
To know what I'm talking about, In the server side in the OnDataReceived even, try to comment the Thread.Sleep(0); and try to get an image, you will got ****, if you put that line again all goes fine, and if you put it, and test it on Wan it will cause problems again, So there is something wrong, and i don't know it
Please any body help me finding that error.
Here is the link of the code, its written using C# 2005, Right click and choose Save Target As...
http://www40.brinkster.com/dominatorlegend/Network_Spy.rar[^]
Thanks every one and hope i explain the problem well, and hope for fast response.
Thanks in advanced for whatever help.
-- modified at 6:41 Wednesday 1st February, 2006
|
|
|
|
|
Ok, trying to loop through a treeview and create connection to each node(pc).
Am running a new thread to do this loop as it is taxing on the application.
PcTree = new Thread(new ThreadStart(enumThread));
PcTree.Name = "PollPCList";
PcTree.Start();
When I look at the output of my node looping I consitently find 3 connections to each node. After trying to step thru the debugger i find that sometimes it does keep this pattern(3 connections), other times i only see one loop for each node. (how odd is that?) -- why is this happening? is it due to the fact that i'm running this on a dual-proc pc?
now, that obviously is the problem, here is my question:
if i haven't done something wrong with my code and i'm stuck with this 'triple threat thread' then is it possible that i increment the foreach loop so that i process 3 different nodes instead of just one node 3 times?
private void enumThread()
{
enumPCtree(PCmonitorTree.Nodes);
}
private void enumPCtree(TreeNodeCollection t)
{
try
{
foreach ( TreeNode tr in t)
{
if (tr.Text.IndexOf("PC")!= -1)
{
tr.Nodes.Equals(tr.NextNode);
}
else
{
ServerName = tr.Text;
try
{
HostIP = System.Net.Dns.GetHostByName(ServerName);
PcIpAddress = HostIP.AddressList[0].ToString();
}
catch
{}
finally
{enumPCtree(tr.Nodes);}
if (PcIpAddress != null)
{
if (breakLoop)
{
break;
}
}
}
}
}
catch (Exception ex)
{MessageBox.Show(ex.Message);}
finally
{
}
}
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
How and where does this process get started? Is it within an event? Is that event getting called multiple times?
wetrivrrat wrote: it due to the fact that i'm running this on a dual-proc pc?
errmm...I'd have to say no.
|
|
|
|
|
I have a number of custom forms and controls that rely on runtime information to do their job. In cases where these items do their setup in the constructor, bad things happen when one of these is displayed in the designer.
Currently, I use the following code to determine if my item is running in the designer:
<br />
public static bool InDesignMode()<br />
{<br />
string exe = Application.ExecutablePath;<br />
if ( exe.IndexOf("devenv.exe") != -1 )<br />
{<br />
return true;<br />
}<br />
return false;<br />
}<br />
Although this works I’m wondering if there is a better way. I don’t like relying on something like a file name to make this kind of decision.
Any ideas or comments?
Thanks!
Chris
|
|
|
|
|
public class Utilities<br />
{<br />
private static bool AppRunnning = false; <br />
public static void Main(string[] args)<br />
{<br />
AppRunnning = true;<br />
Application.Run(new Form1());<br />
}<br />
public static bool InDesignMode<br />
{<br />
get { return !AppRunnning; }<br />
}<br />
}<br />
<br />
public class MyControl:UserControl<br />
{<br />
public MyControl()<br />
{<br />
if (Utilities.InDesignMode)<br />
{<br />
}<br />
else<br />
{<br />
}<br />
}<br />
}
|
|
|
|
|
Thanks!
A much cleaner solution that what I was using.
-Chris
|
|
|
|
|
You could try the Component.DesignMode property (MSDN[^])
Cheers,
Will H
|
|
|
|
|
Thanks... didnt know such existed!
- Malhar
|
|
|
|
|
One of my dialogs is behaving as though the alt key is always pressed. Typing the letter of any of the shortcuts for a button triggers the button regardless of which control currently has focus. None of the other dialogs in my app behave this way, and flicking back and forth between the affected dialog and the remainder's property pages I'm not seeing any relavant seeming differences.
|
|
|
|
|
Hi all,
Im having a problem where i need to show a dialog box(save open cancel dialog box) from a pop up aspx page. on link button click i have opened this dialog box, I have register the script to close tat pop up aspx page which is loaded with the user control.
Is it posible to close the popup window after the dialog box appears.
Please help me out.
regards
Mukilan.P.S
|
|
|
|
|
Hi all,
I want to post some data from the C# application to my blog
that exists on some site.
How can that be done?
It would be gr8 if some one could help me outin this.
Thanks
Pramod
|
|
|
|
|
If you have a formular on your blog web page, you might want to emulate a POST -reqeuest from your C# application to the webserver. You can do this with the HttpWebRequest -class.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Usually blog platform contains "MetaBlog API" .You can interact with blog (post,retrive data) by sending/recieving XML.I guess xml-rpc.net library[^] may help you.
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
Hi, I'd like to know if is possible to implement a KeyPress handling for a Simple Datagrid, without DataTables or DataColumns binded to it.
How can I do?
TNX
|
|
|
|
|
DataGridTextBoxColumn.TextBox.KeyPress += new .................
Live Life King Size
Alomgir Miah
|
|
|
|
|
Thank you so much!
Alessio
|
|
|
|
|
I've got a (3rd party, non fixable) application that isn't responding to Process.CloseMainWindow() What other options do I have to force it to shut down when the app that launched it is closing?
|
|
|
|
|
|