How to Fix Outlook Cannot Connect to Server Error (0x80040115)

When attempting to sync incoming messages, send outbound emails, or perform a manual Send/Receive operation in Microsoft Outlook on Windows 11 or Windows 10, you may be blocked by the error: Task ‘[email protected] – Sending and Receiving’ reported error (0x80040115): ‘Cannot connect to the server’ or We can’t complete this because we can’t contact the server right now. The status bar at the bottom of the Outlook window typically switches from Connected to: Microsoft Exchange to Disconnected or Trying to connect…. In Microsoft 365, Outlook 2021, and earlier editions, error 0x80040115 indicates a transport-layer communication failure between the MAPI-over-HTTP protocol and the Exchange Online mail server, often triggered by corrupted local offline storage tables (.ost), exhausted TCP sockets, or conflicting local security software.

What Causes Error 0x80040115 in Microsoft Outlook?

Unlike simple credential authentication rejections, 0x80040115 represents an abrupt socket disconnect or corrupted synchronization cache:

  • Corrupted Offline Outlook Data File (.OST): The local SQLite-based cache table indexing mailbox headers becoming fragmented or oversized (exceeding 20GB to 50GB thresholds).
  • Stale DNS and Network Routing Tables: Windows DNS resolver caching outdated Exchange Autodiscover endpoint IP addresses.
  • Conflicting Third-Party Outlook Add-ins: COM-based antivirus, anti-spam, or CRM plugins intercepting MAPI network calls and failing to pass security tokens.
  • Damaged Windows Mail Messaging Profile: Corrupted registry subkeys located inside the Outlook Windows profile tree preventing proper Autodiscover XML parsing.
  • Outdated Modern Authentication (ADAL / WAM) Tokens: Stale OAuth2 tokens stored in the Windows Credential Manager failing silent token refreshes.

Step 1: Launch Outlook in Safe Mode to Rule Out Rogue Add-ins

Starting Outlook in Safe Mode bypasses all third-party COM add-ins and custom toolbar configurations.

  1. Press Windows Key + R to open the Run dialogue.
  2. Type outlook.exe /safe and press Enter.
  3. Select your default Outlook profile and click OK.
  4. Check the bottom status bar: if Outlook immediately connects to Microsoft Exchange, a third-party add-on is causing the disconnection.
  5. Navigate to File > Options > Add-ins.
  6. At the bottom, set the Manage dropdown to COM Add-ins and click Go.
  7. Untick all non-Microsoft add-ins (especially third-party security scanners) and click OK. Restart Outlook normally.

Step 2: Flush DNS Resolver Cache and Reset Network Sockets

Outdated IP routing entries frequently prevent Outlook from connecting to Exchange Online clusters.

  1. Press Windows Key + S, type cmd, right-click Command Prompt, and select Run as administrator.
  2. Run the following network commands in sequence:
    ipconfig /flushdns
    ipconfig /registerdns
    netsh winsock reset
    netsh int ip reset
  3. Restart your computer to allow the network stack changes to initialise cleanly.

Step 3: Rebuild the Offline Outlook Data File (.OST)

Deleting a corrupted .ost file forces Outlook to recreate a pristine local database and re-download mailbox data directly from the server without losing any cloud emails.

  1. Close Microsoft Outlook completely.
  2. Press Windows Key + R, type %localappdata%\Microsoft\Outlook, and press Enter.
  3. Locate the .ost file associated with your email address (for example, [email protected]).
  4. Right-click the file and rename it to [email protected] (or delete it).
  5. Relaunch Outlook. The application will automatically create a brand-new .ost file and begin synchronising your mail folders.

Step 4: Clear Stale Microsoft Office Credentials from Windows

Corrupted OAuth2 tokens stored in Windows Credential Manager can cause Exchange Online to refuse transport handshakes.

  1. Close all Microsoft 365 / Office applications.
  2. Press Windows Key + S, type Credential Manager, and press Enter.
  3. Select Windows Credentials.
  4. Scroll down to the Generic Credentials section.
  5. Locate entries beginning with MicrosoftOffice16_Data:ADAL: or MicrosoftAccount:user=.
  6. Click the dropdown arrow next to each entry and click Remove.
  7. Relaunch Outlook; you will be prompted to enter your password and complete multi-factor authentication (MFA) to generate fresh cryptographic tokens.

Step 5: Create a New Outlook Profile

If registry keys inside your current Outlook profile are corrupted, establishing a fresh profile rebuilds all mail account associations.

  1. Press Windows Key + R, type control.exe mlcfg32.cpl (or control and search for Mail), and press Enter.
  2. Click the Show Profiles button.
  3. Click Add, enter a profile name (such as Work-New), and click OK.
  4. Follow the on-screen wizard to input your email address and credentials.
  5. Under When starting Microsoft Outlook, use this profile, select your new profile from the dropdown.
  6. Click Apply and OK, then open Outlook.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.