SBS 2008: Users cannot login to Outlook Web Access (OWA), HTTP status 401: Unauthorized

Symptoms

Under certain conditions, users cannot login to Outlook Web Access (OWA) hosted on SBS 2008. If you analyze the IIS logs for SBS Web Applications web site under C:\Inetpub\Logs\LogFiles\W3SVC3, you may find something similar:

2011-06-21 17:39:09 192.168.1.10 GET /owa/ - 443 - 192.168.1.10 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+WOW64;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.21022;+.NET+CLR+3.0.30729;+.NET+CLR+3.5.30729;+MS-RTC+EA+2) 401 2 5 1
2011-06-21 17:39:28 192.168.1.10 GET /owa/ - 443 mstest 192.168.1.10 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+WOW64;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.21022;+.NET+CLR+3.0.30729;+.NET+CLR+3.5.30729;+MS-RTC+EA+2) 401 2 1332 4

Additionally, when you try to add a new user using the Add User Wizard, it will fail to send out the welcome email and the following warning message is displayed on the finish page of the wizard.

Unable to send welcome email with Exchange Web Services. Please consult your log file for further details.



On analyzing the C:\Program Files\Windows Small Business Server\logs\adduser.log, you may find something similar:

[8332] 110621.130150.4408: Messaging: Initialize ExchangeServiceBinding
[8332] 110621.130150.4408: Messaging: Set web service url from  to https://Sites/EWS/Exchange.asmx
[8332] 110621.130150.4408: Messaging: Web service url has been set to https://sites/EWS/Exchange.asmx
[8332] 110621.130150.6308: Messaging: CreateBaseMessage with Exchange Service Binding url [https://sites/EWS/Exchange.asmx]
[8332] 110621.130150.7258: Messaging: Failed to submit email via Exchange Web Services
[8332] 110621.130150.7288: Messaging: MessagingTaskException: Failed to submit email via Exchange Web Services -- Error# (80003)
[8332] 110621.130150.7288: Messaging: Inner exception: The request failed with HTTP status 401: Unauthorized.
[8332] 110621.130150.7288: Messaging: Stack Trace:
[8332] 110621.130150.7288: Messaging:    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.WindowsServerSolutions.Messaging.Proxy.ExchangeServiceBinding.CreateItem(CreateItemType CreateItem1)
   at Microsoft.WindowsServerSolutions.Messaging.Management.WebServicesMailSubmitter.CreateBaseMessage(ExchangeServiceBinding esb, String HtmlBody, String strSubject, String strToEmail, String strFromEmail)
   at Microsoft.WindowsServerSolutions.Messaging.Management.WebServicesMailSubmitter.SendFromFile(MailType mailType, ExchangeServiceBinding esb, String strEmailBodyFilePath, Dictionary`2 dictVarMapper, Dictionary`2 linkVarMapper, String strSubject, String[] arrFilesToAttach, String strToEmail, String strFromEmail, ProgressChangedHandler progressHandler)
[8332] 110621.130150.7658: Messaging: CreateBaseMessage with Exchange Service Binding url [https://sites/EWS/Exchange.asmx]
[8332] 110621.130150.7738: Messaging: Failed to submit email via Exchange Web Services
[8332] 110621.130150.7738: Messaging: MessagingTaskException: Failed to submit email via Exchange Web Services -- Error# (80003)
[8332] 110621.130150.7738: Messaging: Inner exception: The request failed with HTTP status 401: Unauthorized.
[8332] 110621.130150.7738: Messaging: Stack Trace:
[8332] 110621.130150.7738: Messaging:    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.WindowsServerSolutions.Messaging.Proxy.ExchangeServiceBinding.CreateItem(CreateItemType CreateItem1)
   at Microsoft.WindowsServerSolutions.Messaging.Management.WebServicesMailSubmitter.CreateBaseMessage(ExchangeServiceBinding esb, String HtmlBody, String strSubject, String strToEmail, String strFromEmail)
   at Microsoft.WindowsServerSolutions.Messaging.Management.WebServicesMailSubmitter.SendFromFile(MailType mailType, ExchangeServiceBinding esb, String strEmailBodyFilePath, Dictionary`2 dictVarMapper, Dictionary`2 linkVarMapper, String strSubject, String[] arrFilesToAttach, String strToEmail, String strFromEmail, ProgressChangedHandler progressHandler)
[8332] 110621.130150.7788: AdminTME: Status: TaskId = MessagingTasks.TaskSendWelcomeMail, RootTaskId = TaskCreateUser, Success: True, Warning: True, Continue: True, Message: Unable to send welcome email with Exchange Web Services.  Please consult your log file for further details.
[8332] 110621.130150.9988: AdminTME: Status: TaskId = ClientDeployment.GPOAddSBSUserTask, RootTaskId = TaskCreateUser, Success: True, Warning: False, Continue: True, Message:
[6232] 110621.130150.9988: AdminTME: Committer: Completed called
[6232] 110621.130151.0378: AdminTME: Committer: Committer Completed.

Cause

This issue can occur if the users are not authorized to access the Web Sites and applications.

Resolution

To resolve this issue, follow these steps:

1.) Open IIS Manager

2.) Navigate to the level you want to manager. In this case, it will be SBS Web Applications web site.

3.) In Features View, double-click Authorization Rules.

4.) In the Actions pane, click on 'Add Allow Rule'

5.) In the 'Add Allow Authorization Rule', select the 'All Users' radio button, and then click OK.

6.) Stop and Start the SBS Web Applications web site.

More Information

In IIS 7.0, URL Authorization Rules allows you to put authorization rules. Additionally, the IIS 7.0 URL Authorization configuration is stored in web.config file. In SBS 2008, by default, we create an Allow Rule for "All Users" at the server level which is inherited by all the web sites hosted on the server.
Properties

Article ID: 2570446 - Last Review: Jul 14, 2011 - Revision: 1

Feedback