Solved

My .NET 2.0 webservice call only works when Fiddler is running

Posted on 2010-11-19
8
1,229 Views
Last Modified: 2013-12-17
Hi,

I have a webservice which I deployed to one of servers.  The first 2 calls work as they don't bring any data back the next 2 fail on some machines all the time on others randomly UNLESS Fiddler is running !!!  The error I am getting is in my other question.  I tried using Fiddler to troubleshoot the error but it seems that Fiddler being the the proxy now everything works.

Any advice/help is appreciated

Cheers
H
0
Comment
Question by:gbzhhu
  • 3
  • 3
8 Comments
 
LVL 12

Author Comment

by:gbzhhu
Comment Utility
And no, I can't ask all our clients to install and run fiddler :-).  BTW the call to the web service is coming from a Winforms client
0
 
LVL 21

Accepted Solution

by:
Alfred1 earned 500 total points
Comment Utility
I believe I experienced your issue when I was still working on WSE 3.0 four years ago.  I encountered cases when it works fine and then it errors out intermittently.  I get different types of error including this (An existing connection was forcibly closed by the remote host).

What I found out is that when you reach 1 GB memory in your w3wp.exe (IIS worker process) related to the web service, it crashes out.  This happens when memory leaks occur in the process.  And what I found out that causes this memory leaks is due to "unhandled errors" in the web methods.  This unhandled error also cause the server web method to return an incomplete XML before.

I believe the reason why it is working when Fiddler is running because the errors are handled and there are no memory leaks occurring.

What you need to do is make sure to handle all errors and not let an exception generate in the application event in order to prevent memory leaks.  Also, make sure to promptly dispose objects after use.  Check this link below for some additional tips.

http://blog.whitesites.com/w3wp-exe-using-too-much-memory-and-resources__633900106668026886_blog.htm

http://forums.iis.net/t/1150494.aspx

I hope this helps.
0
 
LVL 21

Expert Comment

by:Alfred1
Comment Utility
Your question --------->  1.  Running Fiddler on client (That is where I run it), how can that affect the server?

I am not sure how fiddler but I can only assume based on your information.  Fiddler might somehow internally handles the errors as it displays the necessary information during web debugging and that is why I inferred that there is no memory leak.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 12

Author Comment

by:gbzhhu
Comment Utility
Alfred1,

I am not still convinced that a memory leak is involved here.  This is my reasoning

1.  Nobody runs the app for awhile and I stop and restart my web service in IIS.  

2. I run the app on one of my colleague's machines.  The first two methods succeed as they only fetch single strings (very small data) the next call to get the larger data fails if user has large data if not it passes.  

3. Perform the same steps in 2 above with Filddler running and everything works regardless of size of data

4. The same steps in 2 above are performed on my PC (not running on the IDE bur running the installed app) and everything works, large data or not, Fiddler running or not running!!  This is the strange one

I still will not dismiss your suspiscion because this is programming and sometimes what seems impossible just happens.

I am going to move the web service to another server but am short of time at this moment.  I have not abandoned the question!  Must not take more than a couple of days

Thanks for your assisnatce.  Really appreciated
H
0
 
LVL 21

Expert Comment

by:Alfred1
Comment Utility
Just came to my mind while reading your latest post, have you tried using the Web Method attribute, BufferResponse property?  You can try setting the BufferResponse property to false since you are dealing with large data.  Check the example in the link below for details on how to use BufferResponse property when it is set to false:

http://msdn.microsoft.com/en-us/library/system.web.services.webmethodattribute.bufferresponse%28v=VS.80%29.aspx

0
 
LVL 12

Author Comment

by:gbzhhu
Comment Utility
Yeah will try that tomorrow when I can access my colleague's PC's

Cheers mate
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now