title: NetSuite Web services hang / timeout from .NET 64 bit App
body: <p>We have noticed that with the 2012 NetSuite Web services (and perhaps all other versions), when we make a call from a .NET 2.0 64-bit application, if the response does not come back quickly, then intermittently our application will hang however in the NetSuite application logs it appears the SOAP call was successful. The hang eventually times out (timeout) after 5 minutes (!) because NetSuite (or something) keeps the socket open, it just stops sending packets.</p>
  <p>We ran a Network Trace and noticed packets coming out of order, being dropped, inexplicable duplicate acks - etc. Essentially, it &quot;freaks out&quot;. Microsoft techs have never seen anything like it - least the ones I talked too.</p>
  <p>We ran a simple test app that does nothing more than passport in, then do a query for Accounting Periods. It's the search method that hangs as it's parsing the SOAP response - always gets about 10s in.</p>
  <p>As soon as we target a 32-bit environment, everything works like a charm, even though the 32-bit binary is running on a 64 bit OS. Clearly, running as a 64-bit app sets some network protocol configuration that NetSuite really doesn't like.</p>
  <p>We tested on Azure, Amazon and on a local (to our corporate network) Windows 2008 R2 SP1 64 bit servers - physical and VM's.</p>
  <p>We don't have hard evidence of the &quot;why&quot; this is happening, but after a month of pulling our hair out (we're all bald now) we think we've stumbled upon an issue. This one is so weird, however, I'm not willing to go out and claim that it's still not something we're doing. So, if you don't believe:</p>
  <ol>
  <li><p>Open Visual Studio 2010 and create an .NET 2.0 console application targeting &quot;Any CPU&quot;.</p>
  </li>
  <li><p>Do a &quot;Add Web reference...&quot; and add the NetSuite WSDL.</p>
  </li>
  <li><p>Create a simple passport login and do a search that returns something with some volume.</p>
  </li>
  <li><p>Run the EXE on a 64-bit OS, several times (this bug is intermittent), during peak working hours (i.e. appears around 7am - 2pm PST).</p>
  <p>That's exactly what we did. If you go back and create a new x86 target and rebuild the project, it works fine.</p>
  </li>
  </ol>