Solved

ActiveSync Broke .NET Issue? 1309

Posted on 2010-09-14
10
2,162 Views
Last Modified: 2012-06-21
I'm having a hell of a time getting ActiveSync to work.  I was having issues with OutlookAnywhere VDir/etc and reinstalled IIS/CAS.  It fixed all my issues then broke ActiveSync.  The error I get when visiting https://ourserver/Microsoft-Server-ActiveSync is as follows.

Server Error in '/Microsoft-Server-ActiveSync' Application.
--------------------------------------------------------------------------------

Could not load file or assembly 'Microsoft.Exchange.AirSync, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Exchange.AirSync, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Exchange.AirSync, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


=== Pre-bind state information ===
LOG: User = NT AUTHORITY\SYSTEM
LOG: DisplayName = Microsoft.Exchange.AirSync, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///D:/Exchange/ClientAccess/sync/
LOG: Initial PrivatePath = D:\Exchange\ClientAccess\sync\bin
Calling assembly : Microsoft.Exchange.AirSyncHandler, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Exchange\ClientAccess\sync\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.Exchange.AirSync, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: The same bind was seen before, and was failed with hr = 0x80070002.

 

Stack Trace:


[FileNotFoundException: Could not load file or assembly 'Microsoft.Exchange.AirSync, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
   Microsoft.Exchange.AirSyncHandler.Handler..ctor() +0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +146
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +298
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +79
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +10364331
   System.Web.Configuration.HttpHandlerAction.Create() +107
   System.Web.Configuration.HandlerFactoryCache..ctor(HttpHandlerAction mapping) +25
   System.Web.HttpApplication.GetFactory(HttpHandlerAction mapping) +108
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +433
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4205


===========

I've tried reinstalling CAS Roles again, as well as IIS.  Removing and recreating all VDirs.  Reinstalling .NET 2.0 (as best I could atleast being its built in.. using -u/-i)  nothing seems to change it..  

Any ideas?

Server Exchange 2007 - SP3
Windows Server 2008 - 64Bit
0
Comment
Question by:ZooyorQ
  • 5
  • 5
10 Comments
 
LVL 25

Expert Comment

by:Tony1044
ID: 33672114
Anything in the Exchange setup log file from when you reinstalled CAS?

Not doing anything like redirecting the websites to OWA?
0
 

Author Comment

by:ZooyorQ
ID: 33672675
No redirects.  Looks like EWS is giving the same error as well.  This is over and over in the log.


Could not load file or assembly 'Microsoft.Exchange.Clients.Strings, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. while compiling method FolderListViewPage.RenderShowELCCommentAndQuotaLink
Could not load file or assembly 'Microsoft.Exchange.Clients.Strings, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. while compiling method FolderTreeContextMenu.RenderMenuItems
Could not load file or assembly 'Microsoft.Exchange.Clients.Strings, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. while compiling method Infobar.AddMessage
Could not load file or assembly 'Microsoft.Exchange.Clients.Strings, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. while compiling method InfobarMessageBuilder.AddNoEditPermissionWarning
Could not load file or assembly 'Microsoft.Exchange.Clients.Strings, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. while compiling method InfobarMessageBuilder.AddReadReceiptNotice

0
 
LVL 25

Accepted Solution

by:
Tony1044 earned 500 total points
ID: 33672820
Not sure if this will help, but worth a look:

Open the web.config file located at <Exchange Install folder>\Client Access\exchweb\ews using an editor like Notepad.exe.

2)      Replace all instances of %ExchangeInstallDir% with the actual path of the Exchange installation folder. E.g. If you have installed Exchange in D:\Program Files\Microsoft\Exchange Server replace %ExchangeInstallDir% with D:\Program Files\Microsoft\Exchange Server\.

Here is a line in the web.config file.

Before

<codeBase version="0.0.0.0" href="file:///%ExchangeInstallDir%bin\Microsoft.Exchange.Common.IL.dll"/>

After

<codeBase version="0.0.0.0" href="file:///D:\Program Files\Microsoft\Exchange Server\bin\Microsoft.Exchange.Common.IL.dll"/>

3)      Restart W3SVC service

-------------------------------------------------------------
0
 

Author Comment

by:ZooyorQ
ID: 33673037
That changes the errors into the following:

501 - Header values specify a method that is not implemented.
The page you are looking for cannot be displayed because a header value in the request does not match certain configuration settings on the Web server. For example, a request header might specify a POST to a static file that cannot be posted to, or specify a Transfer-Encoding value that cannot make use of compression.
0
 
LVL 25

Expert Comment

by:Tony1044
ID: 33673074
I believe that is correct when browsing to it - does it now work with a device?
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:ZooyorQ
ID: 33673124
Kind of.  Seems really flakey though. The device wasn't working a second ago.. now it literally just popped up with a message.   I just got a call from a client saying that their mac is now connecting.  So it does indeed look like that resolved it.
0
 
LVL 25

Expert Comment

by:Tony1044
ID: 33673131
You can also test activesync with the Microsoft online tool here:

https://www.testexchangeconnectivity.com/
0
 

Author Comment

by:ZooyorQ
ID: 33673133
I've got a call with Microsoft in an hour.  I'm going to leave this open so I can add notes from that to anyone else who runs into this error.
0
 
LVL 25

Expert Comment

by:Tony1044
ID: 33673147
That's good to hear.

It would seem that changing the installation path doesn't get reflected properly - when you said the errors were present in the install log, combined with the D:\ in your original post, that's what set me thinking.

Glad to have helped.
0
 

Author Closing Comment

by:ZooyorQ
ID: 33688319
Worked!

Another way to maybe have solved it would have been to recreate the environment variable for the ExchangeDir
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now