Recent Visitor 30
I recently ran into an issue that took quite a bit of time for me to find a resolution for after going through numerous troubleshooting steps so I thought I’d write this blog post in hopes that I’d be able to save others the hours I spent.
Your environment consists of the following:
- A single Exchange 2013 server with both the Mailbox and Client Access roles installed
- The version is 15.0 (Build 1156.6) – CU11
- The operating system is Windows Server 2012 R2 with the latest patches installed as of December 18, 2015
You notice the following warnings consistently logged in the application logs:
Log Name: Application
Source: ASP.NET 4.0.30319.0
Event ID: 1310
Level: Warning
User N/A
Event code: 3008
Event message: A configuration error has occurred.
Event time: 12/18/2015 6:36:46 PM
Event time (UTC): 12/18/2015 10:36:46 PM
Event ID: 10a3589bc8624ee292c0117bcd54bb1c
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/OAB-1233-130949518065162062
Trust level: Full
Application Virtual Path: /OAB
Application Path: D:Program FilesMicrosoftExchange ServerV15FrontEndHttpProxyOAB
Machine name: SVR-MAIL-03
Process information:
Process ID: 2232
Process name: w3wp.exe
Account name: NT AUTHORITYSYSTEM
Exception information:
Exception type: ConfigurationErrorsException
Exception message: Could not load type ‘Microsoft.Exchange.Security.OAuth.OAuthHttpModule’.
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
at System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement)
at System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement)
at System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList)
at System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Could not load type ‘Microsoft.Exchange.Security.OAuth.OAuthHttpModule’.
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
Request information:
Request URL: https://localhost:443/OAB/
Request path: /OAB/
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITYSYSTEM
Thread information:
Thread ID: 21
Thread account name: NT AUTHORITYSYSTEM
Is impersonating: False
Stack trace: at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
at System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement)
at System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement)
at System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList)
at System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Custom event details:
Through the searches I’ve done on the internet, one of the forum recommendations I found here: https://social.technet.microsoft.com/forums/exchange/en-US/00893e96-9fa3-4ceb-a547-93d37a4b25a0/oab-not-working was to review the OAB IIS settings as per the following TechNet article:
Default settings for Exchange virtual directories
The above article indicates that the SSL Settings is recommended to be Not Required but what I’ve found was that the other 2 single Exchange 2013 server environments I had access to that were working actually had the setting enabled:
I did try to disable the Require SSL option and then Reset the directory:
… but this did not fix the issue and the Require SSL option would be re-enabled after a reset.
One of the differences I found between this environment with the problem and the other two was that the Application Pools setting for the MSExchangeOABAppPool had a .NET CLR version of .NET CLR Version v4.0.30319:
… while the other 2 environments I had access to were listed as .NET Framework version of .NET Framework v4.0.30319:
However, after having no success with trying to figure out whether this could be changed because the drop down menu did not have such an option, I logged onto another environment with Exchange 2013 and noticed that it had the same .NET Framework v4.0.30319 for the application pool so I gave up on this.
Next, I used the Get-OabVirtualDirectory | FL cmdlet to copy the exact settings of a server without this error:
Configure the problematic server with the same settings above with the Set-OabVirtualDirectory cmdlet did not correct the issue.
Next, I began comparing the folder C:Program FilesMicrosoftExchange ServerV15FrontEndHttpProxyoab where the virtual directory is mapped to and noticed that the problematic server had the following single web.config file:
The file size was 1KB and the content had only a few lines:
Meanwhile the 2 other servers that did not have this issue had a much larger web.config file with more content and it also had 2 other files;
- global.asax
- web.config.bak
Note that both of them had different file sizes and amount of lines in the web.config file.
After trying a few other solutions without results, I came across the following TechNet article that described how to recreate the OAB folder:
Remove, Re-Create, and Reconnect an Offline Address Book Virtual Directory
I proceeded to use the Get-OABVirtualDirectory cmdlet to save the configuration, the Remove-OABVirtualDirectory to delete the directory, the New-OABVirtualDirectory to recreate the folder, then used the Set-OABVirtualDirectory cmdlet to configure the newly created OAB folder with the same settings as documented earlier.
Following the above steps recreated the web.config file with more content (larger than 1KB) as well as the two additional global.asax and web.config.bak files in the same folder. Restarting the server a few times and reviewing the event logs show that the warning was no longer logged.
2 Responses
My issue was with C:Program FilesMicrosoftExchange ServerV14ClientAccessAutodiscoverweb.config also…
but for some reason there was this line under "Modules". Deleted the line and saved. Did not have to restart IIS, errors went away and Autodiscover started working.
//Ted E
add name="OAuthAuthModule" type="Microsoft.Exchange.Security.OAuth.OAuthHttpModule"
^^with brackets
//Ted E