Tuesday, February 14, 2012

Virtual Directory Errors

I recently installed SP1 on an Exchange server for a client, everything appeared to go fine however after rebooting we ran into various issues with OWA, Autodiscover, ActiveSync, PowerShell and EWS. Also we were unable to launch EMC or Powershell. We were receiving the following error about the various virtual directories. We ran through all the troubleshooting that the Exchange team recommends ( http://blogs.technet.com/b/exchange/archive/2010/02/04/3409289.aspx ) however nothing resolved it. The error we were getting was:

Log Name:      Application
Source:        ASP.NET 2.0.50727.0
Date:          2/10/2012 2:05:46 PM
Event ID:      1310
Task Category: Web Event
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      computer.corp
Description:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 2/10/2012 2:05:46 PM
Event time (UTC): 2/10/2012 9:05:46 PM
Event ID: 1dbea0f1695f48648c8988fb70acec0a
Event sequence: 1
Event occurrence: 1
Event detail code: 0


Application information:
    Application domain: /LM/W3SVC/1/ROOT/Autodiscover-10-129733815458960203
    Trust level: Full
    Application Virtual Path: /Autodiscover
    Application Path: D:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Autodiscover\
    Machine name: ServerName

Process information:
    Process ID: 4600
    Process name: w3wp.exe
    Account name: NT AUTHORITY\SYSTEM

Exception information:
    Exception type: HttpException
    Exception message: Could not load file or assembly 'Microsoft.Exchange.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxx' or one of        its dependencies. The system cannot find the file specified. (D:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Autodiscover\web.config line 855)

Request information:
    Request URL: https://computer.corp:443/Autodiscover/Autodiscover.xml
    Request path: /Autodiscover/Autodiscover.xml
    User host address: XXX.XXX.XXX.XXX
    User:
    Is authenticated: False
    Authentication Type:
    Thread account name: NT AUTHORITY\SYSTEM


Thread information:
    Thread ID: 1
    Thread account name: NT AUTHORITY\SYSTEM
    Is impersonating: False
    Stack trace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
After calling PSS we determined that it actually was something got botched with the SP1 install and the web.config files were not correctly pointed to the install location. So for us what was in the web config was:

 <codeBase version="14.0.0.0" href="file:///%ExchangeInstallDir%bin\Microsoft.Exchange.Sqm.dll" />

however for our install it should be:

<codeBase version="14.0.0.0" href="C:\Program Files\Microsoft\Exchange\V14\bin\Microsoft.Exchange.Sqm.dll" />

4 comments:

listofdemands said...

I came here to say thankyou! Had a similar error with one of our Exchange 2010 Hub CAS servers. This resolved the issue. Much appreciated!!

listofdemands said...

Just wanted to say thanks! Had a similar issue with one of our Exchange 2010 Hub CAS servers. The fix you described also fixed ours - much appreciated.

listofdemands said...

Just wanted to say thanks! Had a similar issue with one of our Exchange 2010 Hub CAS servers. The fix you described also fixed ours - much appreciated.

Stuart Bennett said...

Had this with Exchange 2010 SP3 RU13 today .. Exact same problem.. Thank you for the heads up... Manually edited the web.config in The web.config in C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Autodiscover and warnings have stopped.