title: C# Httpwebreqest will not generate a response unless Fiddler is running for specific host
body: <p>There's actually an additional layer to this that if I try to access that host in my class's first request, it won't even work with Fiddler running.  I'm a bit baffled by it at the moment.</p>
  
  <p>Here's code that works perfectly with Fiddler open:</p>
  
  <pre><code>        HttpWebRequest req = (HttpWebRequest)WebRequest.Create("https://www.ticketmaster.co.nz/member/order_history?start=10000");
          req.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
          req.Headers.Add("Accept-Language: en-US,en;q=0.8");
          req.Headers.Add("Upgrade-Insecure-Requests: 1");
          req.Headers.Add("Accept-Encoding: gzip, deflate, sdch, br");
          req.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36";
          req.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
          using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
          {
          }
          req = (HttpWebRequest)WebRequest.Create("https://www.ticketmaster.com/member/addfavs?tm_link=tm_homeA_mytm_signin");
          req.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
          req.Headers.Add("Accept-Language: en-US,en;q=0.8");
          req.Headers.Add("Upgrade-Insecure-Requests: 1");
          req.Headers.Add("Accept-Encoding: gzip, deflate, sdch, br");
          req.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36";
          req.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
          using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
          {
          }
  </code></pre>
  
  <p>However, if I close Fiddler and run in Debug mode in Visual Studio, I get the following Message:</p>
  
  <blockquote>
    <p>The underlying connection was closed: An unexpected error occurred on a receive.</p>
  </blockquote>
  
  <p>as well as the following Inner Exceptions:</p>
  
  <blockquote>
    <p>Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>An established connection was aborted by the software in your host machine</p>
  </blockquote>
  
  <p>Now, if I simply run the code below, I just get</p>
  
  <blockquote>
    <p>The operation has timed out</p>
  </blockquote>
  
  <p>even if I have Fiddler open.</p>
  
  <pre><code>        HttpWebRequest req = (HttpWebRequest)WebRequest.Create("https://www.ticketmaster.com/member/addfavs?tm_link=tm_homeA_mytm_signin");
          req.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
          req.Headers.Add("Accept-Language: en-US,en;q=0.8");
          req.Headers.Add("Upgrade-Insecure-Requests: 1");
          req.Headers.Add("Accept-Encoding: gzip, deflate, sdch, br");
          req.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36";
          req.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
          using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
          {
          }
  </code></pre>
  
  <p>Can anyone make sense of this?  I'm guessing it has something to do with the encryption between my machine and ticketmaster.com?  I get the following information from the tunnels when using Fiddler on the first code block:</p>
  
  <p>ticketmaster.co.nz</p>
  
  <blockquote>
    <p>Encrypted HTTPS traffic flows through this CONNECT tunnel. HTTPS Decryption is enabled in Fiddler, so decrypted sessions running in this tunnel will be shown in the Web Sessions list. Secure Protocol: Tls12 Cipher: Aes256 256bits Hash Algorithm: Sha384 ?bits Key Exchange: ECDHE_RSA (0xae06) 256bits == Server Certificate ========== [Subject] CN=www.ticketmaster.com.au, OU=Web Systems, O=Ticketmaster LLC, L=West Hollywood, S=California, C=US [Issuer] CN=GeoTrust SSL CA - G3, O=GeoTrust Inc., C=US [Serial Number] 1037AE6FF18FC34C953E39A6DFAB61B5 [Not Before] 5/31/2016 8:00:00 PM [Not After] 7/31/2017 7:59:59 PM [Thumbprint] FC3B52348FE320B9CAF441E98A8D7BFE1D7D3189 [SubjectAltNames] www.ticketmaster.co.nz, ticketmaster.co.nz, ticketmaster.com.au, www.ticketmaster.com.au </p>
  </blockquote>
  
  <p>ticketmaster.com</p>
  
  <blockquote>
    <p>Encrypted HTTPS traffic flows through this CONNECT tunnel. HTTPS Decryption is enabled in Fiddler, so decrypted sessions running in this tunnel will be shown in the Web Sessions list. Secure Protocol: Tls12 Cipher: Aes256 256bits Hash Algorithm: Sha384 ?bits Key Exchange: ECDHE_RSA (0xae06) 256bits == Server Certificate ========== [Subject] CN=www.ticketmaster.com, OU=Web Systems, O=Ticketmaster, L=West Hollywood, S=California, C=US [Issuer] CN=Symantec Class 3 Secure Server CA - G4, OU=Symantec Trust Network, O=Symantec Corporation, C=US [Serial Number] 009C483B9154EE1160A8FEC2044DC8C5 [Not Before] 8/2/2016 8:00:00 PM [Not After] 8/3/2017 7:59:59 PM [Thumbprint] 488B2EE898E409484F61B1DD97023D4EE615C2EF [SubjectAltNames] www.ticketmaster.com, ticketmaster.com </p>
  </blockquote>
  
  <p>I'm using .NET version 4.6.1 for this by the way.</p>