Connessione Outlook – Exchange e gateway

Provando a connettersi a Exchange tramite Outlook si potrebbero riscontrare i seguenti errori:

“The action cannot be completed. The connection to the Microsoft Exchange Server is unavailable. Your network adapter does not have a default gateway.”

“Your Microsoft Exchange Server is unavailable”

“Outlook cannot log on. Verify that you are connected to the network and are using the proper server and mailbox name. The connection to the Microsoft Exchange Server is unavailable. Your network adapter does not have a default gateway.”

Il motivo è che sulla client non è definito un gateway nelle impostazioni di rete.

Se non serve configurare un gateway, o se non si intende configurare un gateway è possibile aggirare il problema aggiungendo una chiave di registro:

  • Per Outlook 2007:
    Aggiungere un valore DWORD DefConnectOpts impostato a 0 nella chiave HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\RPC
  • Per Outlook 2010:
    Aggiungere un valore DWORD DefConnectOpts impostato a 0 nella chiave HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\RPC

Per ulteriori informazioni si veda Error messages when you try to connect Outlook 2007 to Exchange Server: “The action cannot be completed” or “Your Microsoft Exchange Server is unavailable” or “Cannot start Microsoft Office Outlook”.

Per il deploy di questa chiave di registro è possibile utilizzare uno script di login utente dal momento che è una chiave di registry in HKCU:

Per Outlook 2007 è possibile ad esempio utilizzare i comandi:

reg query “HKCU\Software\Microsoft\Office\12.0\Outlook\RPC” /v DefConnectOpts
IF ERRORLEVEL 1 reg add “HKCU\Software\Microsoft\Office\12.0\Outlook\RPC” /v DefConnectOpts /t REG_DWORD /d 0

Per Outlook 2010 è possibile ad esempio utilizzare i comandi:

reg query “HKCU\Software\Microsoft\Office\14.0\Outlook\RPC” /v DefConnectOpts
IF ERRORLEVEL 1 reg add “HKCU\Software\Microsoft\Office\14.0\Outlook\RPC” /v DefConnectOpts /t REG_DWORD /d 0

In alternativa è possibile utilizzare le Group Policy Preferences introdotte in Windows 2008 Server sfruttano la funzionalità Registry Extension, oppure creare una custom Group Policy (a riguardo si veda Deploying Custom Registry Changes through Group Policy).