4

We have multiple new SharePoint 2013 farms built on Windows Server 2012 with a fairly standard, out of the box build. On all of these servers, we frequently get HTTP 500 Internal Server Errors. This frequently happens after the server is restarted or after the nightly app pool recycle. An IISReset usually fixes it but it may take several attempts before it takes. The ULS logs show some errors but a search online doesn't seem to help. We have production 2010 farms that are not experiencing this. It is only happening on the new 2013 farms. Two error messages we see in the ULS logs are listed below. Any hints, tips, or assistance otherwise is much appreciated. Thank you!


SPSecurityContext: Get trust client failed with exception: 
System.IO.FileLoadException: Could not load file or assembly
    'Microsoft.IdentityModel.Extensions, Version=2.0.0.0, Culture=neutral, 
    PublicKeyToken=69c3241e6f0468ca' or one of its dependencies. Provider type not defined. 
    (Exception from HRESULT: 0x80090017)  
    File name: 'Microsoft.IdentityModel.Extensions, Version=2.0.0.0, Culture=neutral, 
    PublicKeyToken=69c3241e6f0468ca' ---> System.Runtime.InteropServices.COMException (0x80090017): 
    Provider type not defined. (Exception from HRESULT: 0x80090017)    

    at Microsoft.SharePoint.SPSecurityContext.GetTrustChannel()    
    at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri context, 
    Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, 
    SecurityToken delegateTo, SPRequestSecurityTokenProperties properties)

An exception occurred when trying to establish endpoint for context: 
Could not load file or assembly 'Microsoft.IdentityModel.Extensions, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=69c3241e6f0468ca' or one of its dependencies. 
Provider type not defined. (Exception from HRESULT: 0x80090017).

 ----- 

2 Answers 2

2

I was experiencing the same issue and saw the same errors in my ULS logs but looking a little further up in the log, I found that the first error to appear was a similar error but for System.ServiceModel.dll. I found the solution here:

http://blogs.msdn.com/b/brian_farnhill/archive/2015/01/16/system-io-fileloadexception-for-system-servicemodel-dll-in-sharepoint-2013.aspx

It turns out that the GPO policies in my environment were very strict and I needed to add both the SharePoint farm account and the IIS_IUSRS account to the 'Impersonate a client after authentication' policy located at the following path:

Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > User Rights Assignment - Impersonate a client after authentication

Once I added these two accounts, the issues went away. Hope this helps!

1

Plese check if security token service and its app pool are in good condition. then restart iis

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.