Issue with Autodiscover and outlook connectivity externally

Jobish George 0 Reputation points
2024-07-03T11:11:19.7966667+00:00

logs

We have got a 2016 exchange organization where we introduced Exchange server 2019. But due to few considerations, we had to remove them. As of now we have only 2016 servers. Since after we had these changes, there are few unexpected issues have come. Could someone please help.

Issues

  1. The autodiscover (\autodiscover\autodiscover.xml has a only one line mentioned as <%@ServiceHost Service="Microsoft.Exchange.Autodiscover.WCF.LegacyAutodiscoverService" %>)

in the Event Viewer, I get the below error,

Unhandled Exception "Object reference not set to an instance of an object."

Stack trace: at Microsoft.Exchange.AutoDiscoverV2.FlightSettingRepository.GetHostNameFromVdir(ADObjectId serverSiteId, String protocol)

at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2.ExecuteOnPremEndFlow(AutoDiscoverV2Request request)

at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2.Execute(AutoDiscoverV2Request request, ITenantRepository tenantRepository)

at Microsoft.Exchange.AutoDiscoverV2.AutoDiscoverV2HandlerBase.<>c__DisplayClass11_0.<ProcessRequest>b__0()

at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func2 filterDelegate, Action1 catchDelegate)

  1. Microsoft Outlook is not able to connect from outside. Prompting for password and never connect.

The screen shot is attached

Could someone please advice, how to move forward.

Regards

Jobish

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,326 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jake Zhang-MSFT 6,370 Reputation points Microsoft Vendor
    2024-07-04T08:42:43.7666667+00:00

    Hi @Jobish George,

    Welcome to the Microsoft Q&A platform!

    According to your description, you encountered the error "Object reference not set to an instance of an object." and Outlook cannot connect externally and keeps prompting for a password due to deleting Exchange Server 2019 and then restoring to Exchange Server 2016.

    I suggest you try the following methods to troubleshoot the error:

    1. Autodiscover problems usually stem from configuration problems. The solution is as follows:
    • Check virtual directory settings:

    Make sure the Autodiscover virtual directory is configured correctly. Use the Exchange Management Shell (EMS) to verify the settings:

    Get-AutodiscoverVirtualDirectory |fl Name, InternalUrl, ExternalUrl, Identity

    • Check the Service Connection Point (SCP):

    Make sure the SCP points to the correct server and URL. Use:

    Get-ClientAccessService |fl AutoDiscoverServiceInternalUri

    • IIS reset and service restart:

    Perform IIS reset and restart related Exchange services:

    iisreset

    Restart service MSExchangeAutodiscoverAppPool

    Restart service MSExchangeAutodiscover

    1. If Outlook cannot connect externally, you can try the following methods:
    • Check external URLs:

    Verify all external URLs for OWA, ECP, EWS, OAB, and Autodiscover. They should point to the correct server and should be externally accessible:

    Get-ClientAccessService |fl name,AutodiscoverServiceInternalUri

    Get-OwaVirtualDirectory |fl name,ExternalUrl

    Get-EcpVirtualDirectory |fl name,ExternalUrl

    Get-WebServicesVirtualDirectory |fl name,ExternalUrl

    Get-OabVirtualDirectory |fl name,ExternalUrl

    • Check authentication settings:

    Make sure the authentication settings on the virtual directories are correct, especially Outlook Anywhere and Autodiscover.

    • Test connectivity:

    Use Microsoft Remote Connectivity Analyzer to test connectivity and diagnose issues: Microsoft Remote Connectivity Analyzer.

    • Clear DNS cache:

    Clear the DNS cache on the client computer and the server:

    ipconfig /flushdns

    Clear-DnsClientCache

    1. Password hint problem
    • Outlook profile:

    Sometimes, creating a new Outlook profile can solve persistent password hint problems.

    • Cached credentials:

    Clear the credentials stored in Windows Credential Manager.

    • Check Autodiscover configuration:

    Make sure that the DNS records for Autodiscover are configured correctly and that the SSL certificate is properly installed on the Exchange server.

    Please feel free to contact me if you have any queries.

    Best,

    Jake Zhang


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.