Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2010-11-19
8
1,262 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

840 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