Solved

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

Posted on 2010-11-19
8
1,266 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
ID: 34171118
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
ID: 34187437
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
ID: 34187676
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 12

Author Comment

by:gbzhhu
ID: 34225172
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
ID: 34225855
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
ID: 34225865
Yeah will try that tomorrow when I can access my colleague's PC's

Cheers mate
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

740 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