I have 2 different servers. Old one is Win 2012, new is Win 2016. I shifted a few of domains from old server to new Win 2016 Server. Now the issue I am facing on the new server is that whenever someone tries to open the domains with any page urls its working fine e.g. http://example.com/page1.aspx or http://example.com/Default.aspx. But when naked domain url (e.g. http://example.com) is opened it takes randomly 2-4 minutes to load the page.

All the domains have Default.aspx in their root and in IIS also it is set on top priority. I've checked server logs and found nothing. I also removed all other documents types from default document list on IIS. Also tried setting it in the web.config file but could not identify the issue.

In the application startup I also tried to log data to at various steps in Global.asax but to no avail.

The same application is working fine in the old Win 2012/IIS 8.5. I wonder if there is any setting/config in Win 2016/IIS 10.0? Application targets .NET Framework 4.8.

  • Check if there is any issue related to multiple redirects (or self redirects). You can use any redirect checker tool. If nothing suspicious, you could also check webpagetest or gtmetrix to find if there is something. Hope you find something by above two methods provided the issue isn't related to IIS configuration.
    – Kannan
    Aug 23, 2020 at 13:40
  • @Kannan There are no redirects on app startup or Default page load. In case there would have been multiple redirects, the issue would have been on the old server too??? And multiple redirects would likely have caused an error.
    – haraman
    Aug 23, 2020 at 14:06
  • @haraman , I think third reason mentioned in this article may help. I also generally get this sometimes, never tested though. kb.blackbaud.com/articles/Article/42473
    – John Bhatt
    Aug 23, 2020 at 15:19

1 Answer 1


One excellent tool for helping to diagnose this is curl along with a --write-out format and the -I and -L flags.

If you use the -I option curl will provide the response headers for each completed request.

The -L flag will make sure that curl follows redirects.

The -w"@/path/to/format/file.txt" flag will allow you to specify a format file that provides a plethora of information about the final request, including some fantastic timing information. This granular timing information can help you diagnose where in the request process the delay is being introduced.

  • Notice that your time_appconnect time is excessively long? It could be that your webserver is having an issue with SSL stapling.
  • What about a long time_namelookup? Check to ensure that dns resolution is quick.
  • Is time_redirect taking forever? Maybe you should check out what's preventing redirects from working properly.
  • etc etc etc

Here is an example format that you can use with curl: https://gist.github.com/manifestinteractive/ce8dec10dcb4725b8513

And here is an example of a request to google using that format and the options I explained above:

➜  ~ curl -IL -s -w"@sniff.txt" google.com
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Date: Mon, 24 Aug 2020 01:24:17 GMT
Expires: Wed, 23 Sep 2020 01:24:17 GMT
Cache-Control: public, max-age=2592000
Server: gws
Content-Length: 219
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN

HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1
P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
Date: Mon, 24 Aug 2020 01:24:18 GMT
Server: gws
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked
Expires: Mon, 24 Aug 2020 01:24:18 GMT
Cache-Control: private
Set-Cookie: 1P_JAR=2020-08-24-01; expires=Wed, 23-Sep-2020 01:24:18 GMT; path=/; domain=.google.com; Secure
Set-Cookie: NID=; expires=Tue, 23-Feb-2021 01:24:18 GMT; path=/; domain=.google.com; HttpOnly

=============  HOST:  ==========

         local_port:  65084
          remote_ip:  redacted
        remote_port:  80

=======  CONNECTION:  ==========

       http_version:  1.1
          http_code:  200
       http_connect:  000
       num_connects:  2
      num_redirects:  1

=============  FILE:  ==========

       content_type:  text/html; charset=ISO-8859-1
      size_download:  0
        size_header:  1013
       size_request:  154
        size_upload:  0
     speed_download:  0.000
       speed_upload:  0.000
  ssl_verify_result:  0
      url_effective:  http://www.google.com/

===  TIME BREAKDOWN:  ==========

    time_appconnect:  0.000000
       time_connect:  0.137004
    time_namelookup:  0.136557
   time_pretransfer:  0.137063
      time_redirect:  0.596540
 time_starttransfer:  0.409782
         time_total:  1.006389

For more information about what you can squeeze out of the curl format configuration, read the --write-out part of the manual page: https://curl.haxx.se/docs/manpage.html

Also of note, I'm not sure if you can do this reliably on Windows. I think it is possible to run curl on Windows, but I've never once attempted to do so so YMMV there. I very highly recommend using a Linux distro instead.

  • I used the curl tool as mentioned and the numbers are good. time_appconnect: 0.000000, time_connect: 0.359000, time_namelookup: 0.015000, time_pretransfer: 0.359000, time_redirect: 0.000000, time_starttransfer: 0.906000, time_total: 0.922000. Explicitly opening the url example.com/Default.aspx takes less than 1 second, but opening example.com is taking 2-4 random minutes.
    – haraman
    Aug 24, 2020 at 11:13
  • 1
    You mean that example.com has a time_total of less than a second? If you do a curl without the -I flag, do you get the full HTML of the page, or are you only getting part of the expected HTML? Something doesn't add up there. Aug 24, 2020 at 12:04
  • If you're getting the full HTML of the page with a time_total of less than a second, then your loading issue is likely going to be something you can further diagnose with gtmetrix.com. Aug 24, 2020 at 12:15
  • Yes, content is very small on default page. Without -I flag full contents are fetched between .9 and 1.15 seconds. curl results are same for both example.com and example.com/Default.aspx. Its only the browsers (both latest chrome and firefox) which take time to load without /Default.aspx
    – haraman
    Aug 24, 2020 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.