Link to home
Start Free TrialLog in
Avatar of Silvan
Silvan

asked on

Exchange 2016 Active Sync Error 500

Dear community,
We have Problems with active sync in Exchange 2016 CU5.
After a Migration from Exchange 2010 to Exchange 2016 CU5 the following error occours when we connect with active sync:

OWA is working!

User generated image
Event code: 3008
Event message: A configuration error has occurred.
Event time: 07.07.2017 08:10:45
Event time (UTC): 07.07.2017 06:10:45
Event ID: d049c0dd0f3b4cc4986b58ec61b74869
Event sequence: 1
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/2/ROOT/Microsoft-Server-ActiveSync-4285-131438814449264551
    Trust level: Full
    Application Virtual Path: /Microsoft-Server-ActiveSync
    Application Path: C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\sync\
    Machine name: XXX
 
Process information:
    Process ID: 18536
    Process name: w3wp.exe
    Account name: IIS APPPOOL\DefaultAppPool
 
Exception information:
    Exception type: ConfigurationErrorsException
    Exception message: Could not load file or assembly 'Microsoft.Exchange.Security, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\sync\web.config line 251)
   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
   at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
   at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
   at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
   at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
   at System.Web.Compilation.BuildManager.ExecutePreAppStart()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

Could not load file or assembly 'Microsoft.Exchange.Security, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)


 
Request information:
    Request URL: https://XXXX:444/Microsoft-Server-ActiveSync/Proxy/default.eas?Cmd=Ping&User=XXXX\mbr&DeviceId=androidc1196298286&DeviceType=Android 
    Request path: /Microsoft-Server-ActiveSync/Proxy/default.eas
    User host address: ::1
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: IIS APPPOOL\DefaultAppPool
 
Thread information:
    Thread ID: 11
    Thread account name: IIS APPPOOL\DefaultAppPool
    Is impersonating: False
    Stack trace:    at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
   at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
   at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
   at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
   at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
   at System.Web.Compilation.BuildManager.ExecutePreAppStart()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)


Following steps are done:
- Active Directory User permissions inherited
- Virtualdirectory recreated
- ADSI Editor old devices removed.

Can you please help us to solve this problem. Thank you
Avatar of Valentina Perez
Valentina Perez
Flag of France image

HI Steff

I had the same issue in the past. You recreated both backend and default web site?

Check in the IIS the authorisation regarding ActiveSync in both back end and default web site?

Regards
Valentina
Did you:

  • Disable forms-based authentication on the Exchange server
  • Enable Integrated Windows authentication on the /Exchange virtual directory.
  • Configure /Exchange virtual directory in Microsoft Internet Information Server (IIS) not to accept only Secure Sockets Layer (SSL) connections.
Hi,

Looking at the connectivity error 'An HTTP 500 response was returned from Unknown'. Did you changed your proxy/firewall recently? or added any DC's into the network?

Yes, one of the cause could be authentication. In the ActiveSync virtual directory, enable annonymous, windows authentication and disable all other.

Worth to have a look at this as well http://www.careexchange.in/exchange-activesync-returned-an-http-500-response-internal-server-error/

Thanks
Avatar of PRADIIP SINGH
PRADIIP SINGH

Error 500 means no action was initiated chekcnifnweb.config fuels and replace it from the working serve
Avatar of Silvan

ASKER

Thanks all for the comments.

- I recreated both back end and Default
- formsbased authentication is disabled but not for virtual Directory OWA (OWA is working)
- SSL ignore on back end and Default Website
- we don't Change any Proxy/Firewall
- we don't add DCs

Thanks for the URL but the permissions are inherited.

when i change the virtual Directory to enable anonymous and Windows authntication. following error appers:

The Initial Anonymous HTTPS request didn't fail, but Anonymous isn't a supported authentication method for this scenario.
in EMC, go to Server Configuration, Client Access, server, and select Exchange ActiveSync tab. You should have Basic Authentication checked and Ignore client certificate selected.

User generated image
Verify your internal/external URL set error code 500 is not about authentication it's about the path
Did you replace the web. Config?
Avatar of Silvan

ASKER

I have Ignore Client Certification and Basic authentication.

@PRADIIP SINGH: how can i replace the web.config? i have no second working Exchange 2016 Server.
These are all default security settings for Exchange directories, did you chek them?
https://technet.microsoft.com/en-us/library/gg247612(v=exchg.150).aspx
The system cannot find the file specified. (C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\sync\web.config line 251)
   at System.Web.Configuration.


That's the error message it's exactly taking about the web.config only. might be you can consider involving Microsoft as it would need some time to invest on this to isolate it and fix it
Or if you have lab you can consider comparing the web.config file from your lab focus on the said line
Avatar of Silvan

ASKER

- I have checked the Default security Settings. All ok.
When i replace the web.config the following error is coming up:

A Web exception occurred because an HTTP 400 - BadRequest response was received from Unknown.

I think it's not a good idea to Change the web.config file because the entries are diffrent. I know nothing about this entries and what they do.
SOLUTION
Avatar of Valentina Perez
Valentina Perez
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did you try this?
Pointing towards right direction.