.NET Forum / ASP.NET / Web Services / September 2006
IIS ASP.net Web Services Disconnected
|
|
Thread rating:  |
EggHead - 15 Sep 2006 18:42 GMT Hi,
sorry if this q was before asked, cannot find the ans anywhere.
I have a web service in IIS 5.0 and IIS 6.0. When I call the web service, the web service makes a txt file and return the file back to me. Once in a while, web service needs at least 1/2 hours to make the file, but I get disconnected before the web services can sent me the file. I changed the connection timeout value on the IIS manager (both levels), set the http-alive to false and change the session time out as well, but it seems no effects on the web services. Am I missing??
Thanks Egghead
Gaurav Vaish (www.EduJiniOnline.com) - 17 Sep 2006 03:07 GMT Is the name of the file generated randomly or you use the same filename?
I would also suggest using FileMon to monitor file activities and you may be able to trace a little better as to what is happening.
 Signature Happy Hacking, Gaurav Vaish | http://www.mastergaurav.com http://www.edujinionline.com http://articles.edujinionline.com/webservices -------------------
> Hi, > [quoted text clipped - 11 lines] > Thanks > Egghead Egghead - 17 Sep 2006 07:20 GMT Hi,
Nothing to do with the filename, the IIS drops the connection after around 5 mins. The web serivces sends the file to no where after the connection has been drop (usually after 5mins). The finny is that it does not flow any expcation at both side. It acts as everything is OK. I change all the time-out prop. at the server-side already, and they are all at least 60 mins.
cheers, egghead
> Is the name of the file generated randomly or you use the same filename? > [quoted text clipped - 16 lines] >> Thanks >> Egghead John Saunders - 17 Sep 2006 15:26 GMT > Hi, > [quoted text clipped - 4 lines] > I change all the time-out prop. at the server-side already, and they are > all at least 60 mins. FYI, IIS has nothing to do with this. It's all a matter of ASP.NET.
In your client, before you make the request, try setting the Timeout property. Assuming that your client proxy class is called FileService:
FileService service = new FileService(); service.Timeout = 1 * 60 * 60 * 1000; // One hour, in milliseconds string fileFromServer = service.GetFile();
I hope that helps, as I haven't been following this thread recently.
John
Egghead - 17 Sep 2006 17:16 GMT Hi,
Thanks for the reply I set the timeout in client to 1-1/2 hours already. As I said, the connection seems is still on since no exception at the server side or client side at all. Everything seems ok at both side. Server thinks it sends the file, but the client just sit there waiting until client-side time out. It is werid. I set all the timeout setting (asp session, http connection, ) to one hour.
cheers, Egghead
>> Hi, >> [quoted text clipped - 17 lines] > > John John Saunders - 17 Sep 2006 21:40 GMT > Hi, > [quoted text clipped - 6 lines] > It is werid. I set all the timeout setting (asp session, http > connection, ) to one hour. FYI, a connection breaking does not cause an exception immediately, either on the client or the server. The server would likely notice the broken connection only when it tried to use the connection to send.
Why do you say "the server thinks it sends the file"? Have you looked at the wire using a network monitoring tool (for instance, see http://www.pocketsoap.com/).
Also, when you set the client timeout to 1.5 hours, does it, in fact, take 1.5 hours before the client times out?
John
Egghead - 18 Sep 2006 00:19 GMT Hi,
That is what I mean, the server thinks the file is send without problem. It is because the file is deleted afterward. We make the server deleted the file after sucessfully send. And, no server-side or client-side throws exception after ow when the file is send. At the client-side, it times out after 1.5 hours if nothing happen. But the file should be send after 30 mins. The problem is that it seems something is broken after around 10 mins, but either side know the connection is broken. In deed, server thinks it send the file over and delete the file afterward. In fact, client-side gets nothing. cheers, Egghead
>> Hi, >> [quoted text clipped - 19 lines] > > John John Saunders - 18 Sep 2006 12:22 GMT > Hi, > [quoted text clipped - 8 lines] > the file over and delete the file afterward. In fact, client-side gets > nothing. Sorry, this is not possible. If the connection had broken, then the server would have thrown an exception when trying to send over the connection. So, either the server didn't send after the connection was broken but simply deleted the file for no good reason; or it did send and throw an exception which was quietly ignored, allowing the server to delete the file; or the connection was not broken, yet the client ceased to receive.
John
EggHead - 18 Sep 2006 15:29 GMT Hi,
We have log file, and we log everything. I mean every line for this case. It does show no exception, and it is a perfect run on the server-side. we delete the file only it runs to the end without any exception.
It is easy for you to test as well. Have a small web service in either c# or vb.net. Have the client connect it (with client side time out in -1), let the connection idle for more than 1/2 hours, then the server send back something (a bytes or an int). You can see the client just sit for hour and hour.
I think it is not the setting in IIS. It can be augured that it is something at the network layer since connection idling for than 20 mins is not in Microsoft thinking.
cheers, Egghead
>> Hi, >> [quoted text clipped - 17 lines] > > John Andy Kendall - 18 Sep 2006 17:02 GMT Hi,
I don't know why this is happening, but have you tried calling the service asynchronously?
> Hi, > [quoted text clipped - 35 lines] > > > > John EggHead - 18 Sep 2006 19:59 GMT Hi here,
Thanks,
We tried that as well; Nothing happen. Just everything that the server send seems goes to the Neverland after around 10 mins. The problem is that it works on a IIS 5.0 (Win2K) before, but not IIS 6.0 (win2k3) after we did the upgrade.
cheers, Egghead
> Hi, > [quoted text clipped - 52 lines] >> > >> > John John Saunders - 18 Sep 2006 17:11 GMT > Hi, > [quoted text clipped - 11 lines] > something at the network layer since connection idling for than 20 mins is > not in Microsoft thinking. You don't seem to have a server-side problem. If you're certain that there are no exceptions being silently ignored, then you don't have a problem with the connection closing, either. The problem must be on the network or in the client.
1) Do you have any unusual networking equipment between the client and server? I would include a proxy as "unusual". Such a device might somehow keep the connection between the server and proxy open, so that the server thinks everything is ok; yet could somehow prevent the client from receiving the data.
2) What kind of client is it? What platform (Windows vs. Java), and what technology (Windows Forms, Console Application, etc.)
John
EggHead - 18 Sep 2006 20:11 GMT Hi here,
You are right, it seems there should not have any problem. It works on IIS 5.0 (win2K) :'( It is on pure Microsoft's .Net envirourment (VB.NET, IIS 6.0, win2k3, winxp, .Net 1.1), no java or other stuff.
BTW, I try that in C# as well; nothing change.
cheers, Egghead
>> Hi, >> [quoted text clipped - 27 lines] > > John John Saunders - 18 Sep 2006 23:52 GMT > Hi here, > [quoted text clipped - 4 lines] > > BTW, I try that in C# as well; nothing change. Thanks for the information.
I don't have much more to add. You should try writing a simple console application to use as a client. Make it as simple as possible to rule out the possibility that the problem is in your existing client code. Run this application on the server machine, in order to rule out any issues with the network. See what happens.
Also, I want to reiterate that this almost certainly has nothing at all to do with IIS. If it works with IIS 5 but not IIS6, then that means that it's working with Win2k but not with Win2003. I strongly suggest that you eliminate any thought of an IIS difference from your considerations.
John
EggHead - 19 Sep 2006 17:45 GMT Hi here,
Thanks for the info.
We did that even with a small web service and small client , and the small client just sit at the server hour and hour.
Since we really just sit and wait, we run multi clients at the server pc and c what happen. This is the weird part: The first running client just sit there. However, any client that started after the first client work??? Of course, none of the clients work if I have multi clients running at the client PC.
I changed LAN timeout setting at the server's registry already. I think it is some weird stuff at the win2k3 as a new security.
Anyway, thanks all the info.
cheers, Egghead
>> Hi here, >> [quoted text clipped - 19 lines] > > John
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|