Error 0x80040115: Connection to Exchange Server Failed - Complete Fix Guide
Complete troubleshooting guide for Outlook error 0x80040115 - Connection to Microsoft Exchange Server failed. Learn to diagnose network issues, firewall problems, DNS configuration, and restore Exchange connectivity.
Table of Contents
Understanding Error 0x80040115
š Version Compatibility: This guide applies to Exchange Server 2016, Exchange Server 2019, Exchange Server 2022 (SE). Commands may differ for other versions.
Error 0x80040115 is a MAPI error code indicating "MAPI_E_NETWORK_ERROR" - a network-level failure preventing Outlook from connecting to Exchange Server. This error occurs when Outlook can resolve the server name but cannot establish a TCP/IP connection. Unlike authentication or configuration errors, 0x80040115 points to infrastructure-level connectivity problems between the client and server.
Microsoft Outlook The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action. Error Code: 0x80040115 -or- Cannot send this item. The connection to the server is unavailable. Try again later or contact your administrator. Reported Error (0x80040115): 'The connection to Microsoft Exchange is unavailable.' -or- Task 'Microsoft Exchange Server' reported error (0x80040115): 'The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.'
Symptoms & Detection
Primary Symptoms
- āOutlook status bar shows "Trying to connect..." or "Disconnected"
- āSend/Receive fails with 0x80040115 error in progress dialog
- āNew emails not arriving, sent items stuck in Outbox
- āCannot open shared calendars or mailboxes
- āOutlook works on company network but fails remotely (or vice versa)
- āConnection Status shows all connections as "Disc" (Disconnected)
Connection Status Window
Ctrl+Right-click Outlook tray ā Connection Status:
Server Name | Conn | Type | Protocol | Req/Fail ---------------------|------|----------|-----------|---------- mail.domain.com | Disc | Mail | MAPI/HTTP | 0/23 mail.domain.com | Disc | Directory| MAPI/HTTP | 0/15 mail.domain.com | Disc | PF | MAPI/HTTP | 0/8 Avg Response Time: N/A (Disconnected) Send/Receive Progress Dialog: ā Task 'Microsoft Exchange Server' reported error (0x80040115): 'The connection to Microsoft Exchange is unavailable.'
Common Causes
1. Network Connectivity Issues
Basic network problems including disconnected LAN/WiFi, failed VPN connection, ISP outages, or routing issues. The client PC cannot establish a TCP connection to the Exchange server's IP address on the required ports.
2. Firewall Blocking Port 443
Corporate or personal firewall blocking HTTPS (port 443) traffic to Exchange. This includes Windows Firewall, third-party firewalls, network firewalls, or cloud-based security services that filter web traffic.
3. DNS Resolution Failure
DNS cannot resolve mail.domain.com or autodiscover.domain.com to an IP address, or resolves to the wrong IP. Common with split DNS configurations, expired DNS records, or when using incorrect DNS servers.
4. Proxy Server Issues
Web proxy intercepting Outlook traffic and either blocking it, requiring authentication, or timing out. WPAD (Web Proxy Auto-Detect) misconfiguration can also cause Outlook to use the wrong proxy settings.
5. Exchange Server Unavailable
Exchange services are down, IIS is stopped, the server is being updated, or the server is unreachable due to hardware failure. In DAG environments, database failover to another server may cause temporary connectivity issues.
6. SSL/TLS Certificate Problems
Expired certificate, untrusted certificate chain, or hostname mismatch causing SSL handshake failure. Outlook silently fails to connect rather than prompting for certificate acceptance in many scenarios.
Diagnostic Steps
Step 1: Test Basic Network Connectivity
Verify the client can reach the Exchange server:
# Test DNS resolution
Resolve-DnsName mail.domain.com
Resolve-DnsName autodiscover.domain.com
# Test port 443 connectivity
Test-NetConnection -ComputerName mail.domain.com -Port 443 -InformationLevel Detailed
# Test with timeout
$tcpClient = New-Object System.Net.Sockets.TcpClient
$result = $tcpClient.BeginConnect("mail.domain.com", 443, $null, $null)
$success = $result.AsyncWaitHandle.WaitOne(5000, $false)
if ($success) {
Write-Host "Port 443 is OPEN" -ForegroundColor Green
$tcpClient.EndConnect($result)
} else {
Write-Host "Port 443 is BLOCKED or TIMEOUT" -ForegroundColor Red
}
$tcpClient.Close()
# Traceroute to identify where connection fails
Test-NetConnection -ComputerName mail.domain.com -TraceRoute
# Check default gateway
Get-NetRoute -DestinationPrefix "0.0.0.0/0"0.0.0/0" | Select-Object NextHop, InterfaceAliasStep 2: Check SSL Certificate
Verify the SSL certificate is valid and trusted:
# Check SSL certificate from client
$url = "https://mail.domain.com"
try {
$request = [System.Net.HttpWebRequest]::Create($url)
$request.Timeout = 10000
$request.AllowAutoRedirect = $false
$response = $request.GetResponse()
$cert = $request.ServicePoint.Certificate
$cert2 = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $cert
Write-Host "Certificate Details:" -ForegroundColor Cyan
Write-Host "Subject: $($cert2.Subject)"
Write-Host "Issuer: $($cert2.Issuer)"
Write-Host "Valid From: $($cert2.NotBefore)"
Write-Host "Valid To: $($cert2.NotAfter)"
Write-Host "Thumbprint: $($cert2.Thumbprint)"
if ($cert2.NotAfter -lt (Get-Date)) {
Write-Host "CERTIFICATE IS EXPIRED!" -ForegroundColor Red
} else {
Write-Host "Certificate is valid" -ForegroundColor Green
}
$response.Close()
} catch {
Write-Host "SSL Connection Error: $($_.Exception.Message)" -ForegroundColor Red
}
# Check certificate chain
$chain = New-Object System.Security.Cryptography.X509Certificates.X509Chain
$chain.Build($cert2) | Out-Null
$chain.ChainStatus | Format-Table Status, StatusInformationStep 3: Check Proxy and Firewall Settings
Verify proxy configuration and firewall rules:
# Check system proxy settings
$proxy = [System.Net.WebRequest]::GetSystemWebProxy()
$testUrl = "https://mail.domain.com"
$proxyUri = $proxy.GetProxy([Uri]$testUrl)
if ($proxyUri.AbsoluteUri -eq $testUrl) {
Write-Host "No proxy for: $testUrl"
} else {
Write-Host "Proxy: $($proxyUri.AbsoluteUri)" -ForegroundColor Yellow
}
# Check IE proxy settings (often inherited by Outlook)
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$proxyEnabled = (Get-ItemProperty -Path $regPath).ProxyEnable
$proxyServer = (Get-ItemProperty -Path $regPath).ProxyServer
Write-Host "Proxy Enabled: $proxyEnabled"
Write-Host "Proxy Server: $proxyServer"
# Check WPAD
$wpad = Resolve-DnsName wpad.domain.com -ErrorAction SilentlyContinue
if ($wpad) {
Write-Host "WPAD found: $($wpad.IPAddress)"
}
# Check Windows Firewall outbound rules
Get-NetFirewallRule -Direction Outbound -Enabled True |
Where-Object {$_.DisplayName -match "Outlook|Exchange|Office"} |
Select-Object DisplayName, Action
# Test if Outlook.exe is blocked
$outlookPath = "$env:ProgramFiles\Microsoft Office\root\Office16\OUTLOOK.EXE"
if (Test-Path $outlookPath) {
Get-NetFirewallApplicationFilter |
Where-Object {$_.Program -like "*OUTLOOK.EXE*"} |
Get-NetFirewallRule | Select-Object DisplayName, Action, Direction
}Step 4: Test from Exchange Server
Verify Exchange is accessible and services are running:
# On Exchange Server - Check services
Get-Service *Exchange* | Where-Object {$_.Status -ne 'Running'} |
Select-Object Name, Status | Format-Table -AutoSize
# Check IIS is running
Get-Service W3SVC, WAS | Select-Object Name, Status
# Test Exchange health
Test-ServiceHealth | Format-Table Identity, Role, RequiredServicesRunning
# Check virtual directory URLs
Get-OwaVirtualDirectory | Select-Object Server, InternalUrl, ExternalUrl
Get-MapiVirtualDirectory | Select-Object Server, InternalUrl, ExternalUrl
# Test connectivity from server to itself
Test-OutlookWebServices -Identity user@domain.com | Format-List
# Check if IIS is responding
Invoke-WebRequest -Uri "https://localhost/owa/healthcheck.htm" -UseBasicParsing
# Check Event Logs for Exchange errors
Get-WinEvent -FilterHashtable @{
LogName = 'Application'
ProviderName = 'MSExchange*'
Level = 2
StartTime = (Get-Date).AddHours(-4)
} | Select-Object -First 10 TimeCreated, ProviderName, MessageQuick Fix (5-15 minutes)
š Immediate Resolution: Network Reset and Bypass
Try these quick fixes in order to resolve most network connectivity issues:
# QUICK FIX 1: Reset network adapter (run as admin)
Get-NetAdapter | Restart-NetAdapter -Confirm:$false
Start-Sleep -Seconds 5
# QUICK FIX 2: Flush DNS cache
ipconfig /flushdns
Clear-DnsClientCache
Write-Host "DNS cache cleared"
# QUICK FIX 3: Reset Winsock and TCP/IP stack
netsh winsock reset
netsh int ip reset
Write-Host "Winsock reset - REBOOT REQUIRED"
# QUICK FIX 4: Temporarily bypass proxy (for testing)
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$currentProxy = (Get-ItemProperty -Path $regPath).ProxyEnable
Set-ItemProperty -Path $regPath -Name "ProxyEnable" -Value 0
Write-Host "Proxy disabled for testing. Re-enable after testing."
# To re-enable: Set-ItemProperty -Path $regPath -Name "ProxyEnable" -Value 1Set-ItemProperty -Path $regPath -Name "ProxyEnable" -Value 1
# QUICK FIX 5: Clear Outlook's cached connections
$outlookPath = "$env:LOCALAPPDATA\Microsoft\Outlook"
Get-Process Outlook -ErrorAction SilentlyContinue | Stop-Process -Force
Remove-Item "$outlookPath\*.xml" -Force -ErrorAction SilentlyContinue
Write-Host "Cleared Outlook cache - restart Outlook"
# QUICK FIX 6: Use specific DNS server (bypass potential DNS issues)
# Test with Google DNS
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("8.8.8.8"8.8.8","8.8.4.4"8.4.4")
Write-Host "DNS set to Google DNS for testing. Revert after testing."š” Pro Tip
Detailed Solutions
Solution 1: Fix DNS Configuration
Ensure DNS properly resolves Exchange server names:
# Check which DNS servers are being used
Get-DnsClientServerAddress -AddressFamily IPv4 | Format-Table InterfaceAlias, ServerAddresses
# Test resolution with specific DNS servers
$dnsServers = @("DC01.domain.local", "DC02.domain.local", "8.8.8.8"8.8.8")
$hostnames = @("mail.domain.com", "autodiscover.domain.com")
foreach ($dns in $dnsServers) {
Write-Host "`nDNS Server: $dns" -ForegroundColor Cyan
foreach ($host in $hostnames) {
try {
$result = Resolve-DnsName $host -Server $dns -ErrorAction Stop
Write-Host " $host -> $($result.IPAddress)"$result.IPAddress)" -ForegroundColor Green
} catch {
Write-Host " $host -> FAILED" -ForegroundColor Red
}
}
}
# Check for DNS record issues
Resolve-DnsName mail.domain.com -Type A
Resolve-DnsName mail.domain.com -Type CNAME
Resolve-DnsName autodiscover.domain.com -Type A
# Set correct DNS servers
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("192.168.1.10"168.1.10", "192.168.1.11"168.1.11")
# For split DNS issues - ensure internal DNS has correct records
# On your DNS server, verify these records exist:
# - mail.domain.com -> A record -> Exchange server IP
# - autodiscover.domain.com -> A record -> Exchange server IPSolution 2: Configure Firewall Exceptions
Add necessary firewall rules for Outlook connectivity:
# Add Windows Firewall rule for Outlook (run as admin)
# Check common Office installation paths
$outlookPath = "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE"
$outlookPathx86 = "C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE"
$outlookPaths = @($outlookPath, $outlookPathx86)
foreach ($path in $outlookPaths) {
if (Test-Path $path) {
New-NetFirewallRule -DisplayName "Microsoft Outlook (Allow)" -Direction Outbound -Program $path -Action Allow -Profile Any
Write-Host "Firewall rule added for: $path" -ForegroundColor Green
}
}
# Allow outbound HTTPS
New-NetFirewallRule -DisplayName "HTTPS Outbound (Exchange)" -Direction Outbound -LocalPort 443 -Protocol TCP -Action Allow
# Allow outbound to specific Exchange server
New-NetFirewallRule -DisplayName "Exchange Server" -Direction Outbound -RemoteAddress "192.168.1.100"168.1.100" -Action Allow
# Check existing rules
Get-NetFirewallRule | Where-Object {$_.DisplayName -match "Outlook|Exchange"} |
Select-Object DisplayName, Direction, Action, Enabled | Format-Table
# For corporate firewalls (network team configuration):
# Ensure these URLs are allowed through the firewall:
# - mail.domain.com:443 (HTTPS)
# - autodiscover.domain.com:443 (HTTPS)
# - Specific EWS/ActiveSync/OWA URLs as neededSolution 3: Fix Proxy Configuration
Configure proxy bypass for Exchange URLs:
# Check current proxy settings
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$settings = Get-ItemProperty -Path $regPath
Write-Host "Proxy Enabled: $($settings.ProxyEnable)"
Write-Host "Proxy Server: $($settings.ProxyServer)"
Write-Host "Proxy Bypass: $($settings.ProxyOverride)"
# Add Exchange URLs to proxy bypass list
$currentBypass = (Get-ItemProperty -Path $regPath).ProxyOverride
$exchangeUrls = "mail.domain.com;autodiscover.domain.com"
if ($currentBypass) {
$newBypass = "$currentBypass;$exchangeUrls"$exchangeUrls"
} else {
$newBypass = $exchangeUrls
}
Set-ItemProperty -Path $regPath -Name "ProxyOverride" -Value $newBypass
Write-Host "Added Exchange URLs to proxy bypass list"
# For PAC file environments - ensure the PAC file returns DIRECT for Exchange
# Example PAC file entry:
# if (shExpMatch(host, "*.domain.com")) { return "DIRECT"; }"DIRECT"; }
# Clear proxy for testing
# Set-ItemProperty -Path $regPath -Name "ProxyEnable" -Value 0-Path $regPath -Name "ProxyEnable" -Value 0
# Configure Outlook-specific proxy settings (if needed)
# Registry: HKCU\Software\Microsoft\Office\16.0\Outlook\HTTP0\Outlook\HTTP
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\HTTP"0\Outlook\HTTP" -Force
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\HTTP"0\Outlook\HTTP" -Name "UseHttpsProxy" -Value 0 -Type DWordSolution 4: Fix SSL Certificate Issues
Resolve certificate trust and validation problems:
ā ļø Danger Zone
# Download and inspect the certificate
$url = "https://mail.domain.com"
$request = [System.Net.HttpWebRequest]::Create($url)
try {
$request.GetResponse() | Out-Null
} catch { }
$cert = $request.ServicePoint.Certificate
$certBytes = $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert)
# Save certificate for inspection
$certPath = "$env:TEMP\exchange_cert.cer"
[System.IO.File]::WriteAllBytes($certPath, $certBytes)
Write-Host "Certificate saved to: $certPath"
# Check if certificate is trusted
$cert2 = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certPath)
$chain = New-Object System.Security.Cryptography.X509Certificates.X509Chain
$chain.ChainPolicy.RevocationMode = [System.Security.Cryptography.X509Certificates.X509RevocationMode]::NoCheck
$result = $chain.Build($cert2)
if ($result) {
Write-Host "Certificate chain is VALID" -ForegroundColor Green
} else {
Write-Host "Certificate chain INVALID" -ForegroundColor Red
$chain.ChainStatus | ForEach-Object {
Write-Host " Status: $($_.Status) - $($_.StatusInformation)"$_.StatusInformation)" -ForegroundColor Yellow
}
}
# Import root CA certificate if needed (run as admin)
# Import-Certificate -FilePath "C:\Certs\RootCA.cer" -CertStoreLocation Cert:LocalMachineRoot-FilePath "C:\Certs\RootCA.cer" -CertStoreLocation Cert:LocalMachineRoot
# Update certificate trust list
certutil -syncWithWUSolution 5: Troubleshoot VPN Connectivity
For remote users experiencing issues over VPN:
# Check if VPN is connected
Get-VpnConnection | Format-Table Name, ConnectionStatus, ServerAddress
# Check routing when VPN is connected
Get-NetRoute -DestinationPrefix "192.168.1.0/24"168.1.0/24" # Replace with your Exchange subnet
# Test connectivity through VPN
$exchangeIP = (Resolve-DnsName mail.domain.com).IPAddress
Test-NetConnection -ComputerName $exchangeIP -Port 443
# Check if split tunneling is causing issues
# If Exchange IP isn't routed through VPN, you need to add a route
# Route add for VPN (requires admin and VPN connected):
# route add 192.168.1.100 mask 255.255.255.255 <VPN_Gateway_IP>168.1.100 mask 255.255.255.255 <VPN_Gateway_IP>
# For always-on VPN or DirectAccess, check these:
Get-DAClientExperienceConfiguration
Get-DAConnectionStatus
# If VPN disconnects Outlook, check MTU settings
# Sometimes VPN has smaller MTU causing fragmentation issues
netsh interface ipv4 show interfaces
# If needed: netsh interface ipv4 set subinterface "VPN Interface" mtu=14001400
# Check VPN DNS settings
Get-DnsClient | Format-Table InterfaceAlias, ConnectionSpecificSuffixš” Pro Tip
Verification Steps
Confirm Connectivity is Restored
# Comprehensive connectivity test
Write-Host "=== Network Connectivity Test ===" -ForegroundColor Cyan
# 1. DNS Resolution
$dns = Resolve-DnsName mail.domain.com -ErrorAction SilentlyContinue
if ($dns) {
Write-Host "ā DNS Resolution: mail.domain.com -> $($dns.IPAddress)" -ForegroundColor Green
} else {
Write-Host "ā DNS Resolution: FAILED" -ForegroundColor Red
}
# 2. Port 443 Connectivity443 Connectivity
$port = Test-NetConnection -ComputerName mail.domain.com -Port 443 -WarningAction SilentlyContinue
if ($port.TcpTestSucceeded) {
Write-Host "ā Port 443: OPEN" -ForegroundColor Green
} else {
Write-Host "ā Port 443: BLOCKED" -ForegroundColor Red
}
# 3. SSL Certificate
try {
$request = [System.Net.HttpWebRequest]::Create("https://mail.domain.com")
$request.Timeout = 5000
$response = $request.GetResponse()
$cert = $request.ServicePoint.Certificate
if ($cert.GetExpirationDateString() -gt (Get-Date).ToString()) {
Write-Host "ā SSL Certificate: Valid until $($cert.GetExpirationDateString())" -ForegroundColor Green
} else {
Write-Host "ā SSL Certificate: EXPIRED" -ForegroundColor Red
}
$response.Close()
} catch {
Write-Host "ā SSL Connection: $($_.Exception.Message)" -ForegroundColor Red
}
# 4. HTTP Response
try {
$web = Invoke-WebRequest -Uri "https://mail.domain.com/owa/healthcheck.htm" -UseBasicParsing -TimeoutSec 10
Write-Host "ā HTTP Response: $($web.StatusCode) OK" -ForegroundColor Green
} catch {
Write-Host "ā HTTP Response: FAILED" -ForegroundColor Red
}
# 5. Outlook Status (manual check)
Write-Host "`n=== Manual Verification ===" -ForegroundColor Cyan
Write-Host "1. Open Outlook"
Write-Host "2. Check status bar shows 'Connected to Microsoft Exchange'"
Write-Host "3. Ctrl+Right-click tray > Connection Status - all should show 'Conn'"-click tray > Connection Status - all should show 'Conn'"
Write-Host "4. Send test email to yourself"ā Success Indicators
- ⢠Outlook status shows "Connected"
- ⢠Send/Receive completes without error
- ⢠Connection Status all "Conn"
- ⢠New emails arriving normally
- ⢠Shared resources accessible
ā Requires Further Action
- ⢠Port test successful but Outlook fails
- ⢠Works on network A but not network B
- ⢠Intermittent connectivity (sometimes works)
- ⢠Different error code appears
- ⢠Only some users affected
Prevention Strategies
š Monitoring
- ⢠Monitor Exchange connectivity from multiple locations
- ⢠Set up SSL certificate expiry alerts
- ⢠Track DNS resolution times
- ⢠Monitor firewall blocked connections
- ⢠Alert on VPN tunnel failures
š§ Configuration
- ⢠Document all Exchange URLs and IPs
- ⢠Maintain proxy bypass list
- ⢠Configure split DNS properly
- ⢠Set up redundant DNS servers
- ⢠Document firewall rules
š Security
- ⢠Renew certificates before expiry
- ⢠Keep CA certs in trusted stores
- ⢠Audit firewall rules regularly
- ⢠Test security software exclusions
- ⢠Validate VPN configurations
š User Support
- ⢠Provide network troubleshooting guide
- ⢠Document VPN connection steps
- ⢠Create self-service DNS flush guide
- ⢠Establish escalation procedures
- ⢠Maintain known-issues list
When to Escalate
Professional Exchange Support Required If:
- š“All users across the organization experiencing connectivity failures
- š“Complex load balancer or reverse proxy configuration issues
- š“Multi-site network routing problems
- š“Certificate infrastructure or PKI issues
- š“Intermittent failures that are difficult to reproduce
- š“Exchange Server itself may be having service issues
Expert Exchange Connectivity Support
Microsoft-certified engineers restore Exchange connectivity with 15 Minutes response time, 24/7
Frequently Asked Questions
Related Exchange Server Errors
Can't Resolve 0x80040115?
Exchange errors can cause data loss or extended downtime. Our specialists are available 24/7 to help.
Emergency help - Chat with usMedha Cloud Exchange Server Team
Microsoft Exchange Specialists
Our Exchange Server specialists have 15+ years of combined experience managing enterprise email environments. We provide 24/7 support, emergency troubleshooting, and ongoing administration for businesses worldwide.