• Link to Facebook
  • Link to LinkedIn
  • Link to Youtube
Priasoft
  • O365 & Exchange Server Management Tools
    • Office 365 & Exchange Migration Solutions
      • Public Folder Migration & Synchronization Manager
      • Priasoft Migration Suite for Exchange & Office 365
      • Mailbox Migration Manager
      • Office 365 Tenant-to-Tenant Migration
      • Collaboration Suite for Exchange (GALSync) – Two-way Sync AD organizations
      • Outlook Rules Migration Utility
      • Outlook Profile Update Manager for M365
    • eDiscovery & Compliance for Exchange
      • Exchange Data Discovery Lab
        • Exchange Data Discovery Lab – For Government Agencies
        • Exchange Data Discovery Lab – For HR & Compliance
        • Exchange Data Discovery Lab – For AI & Data Science
        • Exchange Data Discovery Lab – For IT Operations
        • Exchange Data Discovery Lab – For Legal Professionals
    • Exchange Data & Reporting Tools
      • Public Folder Analyzer for Office 365
      • Super-ExMerge – ExMerge for Exchange
    • Other Solutions and Free Tools
      • AutoDiscover Test Tool
  • Office 365 Migration Services
    • Expert Exchange Public Folder Cleanup & Discovery Services
    • Public Folder Migration Service for Office 365
    • Microsoft 365 Migration Success & Planning Workshop
  • Exchange Insights & Tips
    • How to Migrate Public Folders – Complete Guide
    • How to Backup Public Folders to PST
    • Best Way to Import Quickly PST’s to Office 365
    • Resources Library
  • Company
    • About Priasoft
    • Contact Us
    • Customer Success Stories
    • Press and Latest News
    • Priasoft Community Blog
    • Product Support
      • FAQs
      • Knowledge Base
      • Contact Support Team
      • Support Documents
    • Partners
      • Recommend a Partner
    • Why Priasoft?
      • What’s New Priasoft
      • Priasoft Migration Suite Features
  • Start Evaluating
  • Menu Menu

SSL Connection to AutoDiscover slow or times-out on domain joined computer with invalid cached credentials

Technical
Priasoft Migration Suite for Exchange (PMSE)
By Priasoft Editorial Team · Published August 28, 2017 · Updated April 23, 2026

Once again, I found myself coding. A common occurrence since I am always assisting customers and partners whom hit a technological roadblock that can ultimately be solved with IT.  A similar roadblock was reached when I uncovered a frustrating issue with AutoDiscover while working on some updates to our own tools in order to support mapiHTTP connections.

In making updates to Priasoft Migrator so it would   support mapiHTTP it became necessary to retrieve data about mailboxes and public folders from AutoDiscover.  Since the most common connection to this service is conducted over a secure route (SSL/TLS), we wrote our code to do the same, essentially connecting to https://server/autodiscover/autodiscover.xml.

However, the computer where I do a bulk of the development tasks is not a domain-joined PC.  I do this by choice as it assures that if I hit any issues, they are worked through and make it into the product.

Once the new code was written and our team was initiating testing and production readiness, I began to test these updates on a domain-joined host.  Initially I found that the connections to the AutoDiscover service began timing out…from a domain joined machine!  One would not normally expect two machines that sit on the same LAN to timeout accessing a website or webservice.

Fiddler and Wireshark were brought in to scope to troubleshoot, and to our surprise we discovered that the SSL/TLS handshake between the client code and the IIS instance on the Exchange server was taking way too long.  As the code was written, the conversation with the webserver was handled synchronously such that further processing could not continue until the secure handshake complete.  By the time the handshake completed and the client code resumed, the internal timeout had expired and the whole thing unwound.

Searching the web proved to be a waste of time.  There was far too many variables that could give similar results, and all of the common topics that bubbled up didn’t match the experience I had.

To be clear, this did NOT occur from a non-domain-joined host.  At first glance I thought it was some difference between the OSes (dev is Win8, test host is Server2008) or some difference between .NET or a difference between updates or something…none of which presented an issue.

I also considered that maybe the issue was a factor of the authentication routine, since   AutoDiscover requires authentication before it can return information.  However, after much trial and error, we found that the authentication was not a variable either since the code was never reaching the authentication point; it was timing out before that could occur.

Raising the timeouts on the client code DID work.  However, there was such a stark contrast in the responsiveness between my dev host and the test host that increasing the timeouts just didn’t seem like the right answer.  So, as engineering led techies further investigation ensued.

Once it was determined that the issue lied solely in the SSL/TLS handshake, the focus move to that.  ILSpy was used to investigate some of the Microsoft code to see what it does and to see if there were flags or options to control how it worked.  We then encountered an anomaly from the Wireshark traces that became a focal point.  In those traces in became clear that before any TLS handshaking would occur, initial  attempts at a Kerberos/RPC connection to IIS would occur, , then finally a TLS handshake would take place.

In contrast, a non-domain-joined host never even attempted the Kerberos/RPC connections.  It would go immediately for the TLS handshake.  This seemed to be the key difference.  The question was how and why was my client code doing that?  We certainly didn’t write any code to try to make an RPC connection to the webserver!

So, as it is typical with such troubleshooting, many hours were consumed trying to control the connection to prevent the RPC connection attempt.  Basic authentication was looked at, and as mentioned before, had no bearing on the issue since that action comes AFTER the secure handshake.  But, intuitively it seems that such would possibly side-step this other connection action.

Wireshark would clearly show every time that “windows authentication” was being attempted first before the TLS handshaking.  One of the recurring trace elements from Wireshark was also several “SMB” logon attempts, but those were initially discarded as related because there were other communications outside of this client application that could connect with the same server.  Eventually the patterned showed that these SMB logons only occurred when the client code was running.

Upon looking at the details of these events, it was seen that the windows host where this client code was running was attempting to validate and authenticate to the Exchange server using “Windows Networking”, meaning a secure “integrated” connection that can occur between windows hosts in the same domain.  This ultimately is a part of LSA and SSPI and THIS IS ALWAYS DONE!  One cannot bypass this because the lower level code that handles the secure connection from one host to another detects that the computer is domain-joined.

So, the question then became, why is this connection failing?  Why is it taking so long to figure out that the “domain authentication” won’t work?  In the end it was because of a bad credential.  The critical variable that was never considered was a cached credential in the windows “Credential Manager”.  The long delay, due to many retries, before the TLS handshake was due to windows having to retry for each installed authentication provider (Kerberos, NTLM, Digest, etc.).  Windows will exhaust all of those before dropping to the TLS handshake.

In the windows credential manager, there as a “domain” credential for the target Exchange server, but with a bad password.  To be clear, this was not stored for use by web browsers and generally such credentials are stored i the “Web Credentials” or “Generic Credentials” areas, so this credential didn’t immediately come to mind.  However, since Windows was trying to establish a computer-to-computer connection between domain-joined hosts, that action occurs (or is attempted) before any other.  It is this same feature that allows for single-sign-on to an internal webservice/website, provided that the webserver can handle “Windows Integrated Authentication”.  But, don’t get the wrong idea here.  Even if you turn off Windows Integrated Authentication on the target webserver, this lower level handshaking still occurs.  The option in IIS for Windows Integrated Authentication comes into action AFTER the computer-to-computer connection is made.

In the end, removing the bad credential changed experience immediately.  Once the two computers could validate each other at a domain level, the TLS connection could then be started.

Ready to Talk Through Your Migration?

Priasoft has been handling Exchange and Microsoft 365 migrations since 1999. Whether you're scoping a new project or recovering from a stalled one, our engineers have seen it before. No sales pitch — just a working conversation with people who have done this work at scale.

Speak With an Engineer Download a Free Trial

Related Reading

  • Tenant-to-Tenant Migration Checklist: What to Do Before You Move a Single Mailbox Tenant-to-Tenant Migration Checklist: What to Do Before You Move a Single Mailbox May 19, 2026
  • What Is Super-ExMerge and Why Do IT Teams Still Need It in 2026? What Is Super-ExMerge and Why Do IT Teams Still Need It in 2026? May 12, 2026
  • Exchange 2019 Patches Just Ended. Here Is What IT Teams Need to Do This Month. Exchange 2019 Patches Just Ended. Here Is What IT Teams Need to Do This Month. May 5, 2026
August 28, 2017
Share this entry
  • Share on Facebook
  • Share on X
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Reddit
  • Share by Mail
https://www.priasoft.com/wp-content/uploads/2024/10/HomePg_Image_PMSE.png 150 150 Priasoft Editorial Team /wp-content/uploads/2016/01/Pria_email_logo.png Priasoft Editorial Team2017-08-28 19:23:042026-04-23 13:20:10SSL Connection to AutoDiscover slow or times-out on domain joined computer with invalid cached credentials

Recent Posts

  • Office 365 Tenant to Tenant
    Tenant-to-Tenant Migration Checklist: What to Do Before You Move a Single MailboxMay 19, 2026 - 2:00 pm
  • Super-ExMerge (SXM)
    What Is Super-ExMerge and Why Do IT Teams Still Need It in 2026?May 12, 2026 - 2:00 pm
  • Priasoft Migration Suite for Exchange (PMSE)
    Exchange 2019 Patches Just Ended. Here Is What IT Teams Need to Do This Month.May 5, 2026 - 2:00 pm

Archives

Categories

  • Compliance
  • eDiscovery
  • Guide
  • How to
  • Microsoft 365
  • News
  • Outlook PST
  • Press Release
  • PST Data Management
  • Public Folders
  • Security
  • Technical

The Exchange Experts – Who Are We?

Priasoft, a Microsoft Partner, offers enterprise-class solutions for Exchange migration, management, and eDiscovery. Supporting Exchange 2010, 2013, 2016, 2019, and Office 365/Exchange Online, our platform enables secure migration, management, and organization of email data, with advanced tools for compliance, public folder analysis, and AI-driven insights.


YouTube Play Button  LinkedIn LogoFacebook Logo

Exchange Quick Links

• Exchange Data Discovery Lab (eDiscovery)
• Public Folder Migration to Office 365
• Public Folder Analyzer for Office 365
• Super-ExMerge for Office 365
• Collaboration Suite (GalSync)
• Microsoft Outlook Profile Update Manager
• Privacy Policy
• Terms of Use

Recent Posts

  • Tenant-to-Tenant Migration Checklist: What to Do Before You Move a Single Mailbox
  • What Is Super-ExMerge and Why Do IT Teams Still Need It in 2026?
  • Exchange 2019 Patches Just Ended. Here Is What IT Teams Need to Do This Month.

Contact Priasoft – The Exchange Experts

Have questions? Speak to a Priasoft Engineer
Email: sales (at) priasoft.com
+1 (480) 520-0873

Scroll to top Scroll to top Scroll to top

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.

OKLearn more

Cookie and Privacy Settings



How we use cookies

We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.

Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

Essential Website Cookies

These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

Because these cookies are strictly necessary to deliver the website, refusing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

Other external services

We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

Google Webfont Settings:

Google Map Settings:

Google reCaptcha Settings:

Vimeo and Youtube video embeds:

Privacy Policy

You can read about our cookies and privacy settings in detail on our Privacy Policy Page.

Privacy Policy
Accept settingsHide notification only