title: Transferring files via ASP.Net webservice is super-slow
body: <p>We have a legacy WSE3 ASP.Net webservice here that defines a method <code>GetFileContent(string fileName)</code>. What it does is check a predefined path for a file with the passed name, read its content, base64-encode it and send that encoded stuff back as a response.</p>
  
  <p>Unfortunately, the whole process takes (varying) ages. I have written a console client app that benchmarks the performance on demand:
  Sometimes 2.5Megs are transferred within 12 seconds, sometimes it takes 40. Another 27Meg-file ran through in 16 seconds yesterday, today it took > 1 min.</p>
  
  <p>Further things I have checked:</p>
  
  <ul>
  <li><p>CPU and Swap performance are not worth mentioning (on monitoring, the machine looks bored)</p></li>
  <li><p>network speed is sufficient.</p></li>
  <li><p>The method call is performed immediately after the client has sent the request. </p></li>
  <li><p>The reading and encoding takes an average of 500ms for a big file, so that the return statement is also performed immediately after the request.</p></li>
  <li><p>Another client (Java-based) is even slower, so I guess it <strong>could</strong> be a client problem.</p></li>
  </ul>
  
  <p>Does anybody have an idea where to look next to get behind this nasty one? Feels like IIS trouble, really...</p>
  
  <p>Thanks a lot in advance...</p>