Sharepoint Subscription Edition - Failed to access site at WFE server (IIS error)

Алексей Бабин 1 Reputation point
2021-11-17T14:01:31.327+00:00

I try to create small MinRole based SharePoint farm, that consists from:

  • ApplicationAndSearch (the first server, from which Config Database was created and CA runs);
  • WebFrontEndAndDistributedCache (the second one, connected to the farm).

When I create new web application with WFE DNS-A address as host-header (and URL), I see such an error message from IIS:

[InvalidOperationException: The farm is unavailable.]
   Microsoft.SharePoint.Administration.Claims.SPSecurityTokenServiceManager.get_Local() +300
   Microsoft.SharePoint.IdentityModel.SPChunkedCookieHandlerV2..ctor() +146

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +142
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +107
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1476
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
   System.IdentityModel.Configuration.TypeResolveHelper.Resolve(ConfigurationElementInterceptor customTypeElement, Type customType) +555

[ConfigurationErrorsException: ID0012: Failed to create an instance of 'Microsoft.SharePoint.IdentityModel.SPChunkedCookieHandlerV2, Microsoft.SharePoint.IdentityModel, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' from configuration.]
   System.IdentityModel.Configuration.TypeResolveHelper.Resolve(ConfigurationElementInterceptor customTypeElement, Type customType) +1723
   System.IdentityModel.Services.CookieHandlerElement.ApplyCustom(CookieHandler& handler) +159
   System.IdentityModel.Services.CookieHandlerElement.GetConfiguredCookieHandler() +379
   System.IdentityModel.Services.Configuration.FederationConfiguration.LoadConfiguration(FederationConfigurationElement element) +405
   System.IdentityModel.Services.FederatedAuthentication.CreateFederationConfiguration() +119
   System.IdentityModel.Services.FederatedAuthentication.get_FederationConfiguration() +123
   System.IdentityModel.Services.HttpModuleBase.Init(HttpApplication context) +99
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +575
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +259
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +311

[HttpException (0x80004005): ID0012: Failed to create an instance of 'Microsoft.SharePoint.IdentityModel.SPChunkedCookieHandlerV2, Microsoft.SharePoint.IdentityModel, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' from configuration.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +518
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +729

When I change DNS A record to App'n'S server, web application works well.

Permissions for Farm and Pool accounts on both servers seems to be quite similar. I tried to disconnect WFE server from farm and connect again, change MinRole for it, reinstall sharepoint on WFE. So shortly - everything works well at server, on which was created Configuration Database, on the second one - doesn't.

May someone give a piece of good advice - where else to look?

Internet Information Services
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,991 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CaseyYang-MSFT 10,456 Reputation points
    2021-11-18T08:21:38.873+00:00

    Hi @Алексей Бабин ,

    Did you set any AAM configuration for the WFE server?

    Here are some similiar issues for you reference:

    SharePoint 2013 application error
    Failed to create an instance of 'Microsoft.SharePoint.IdentityModel.SPTokenCache, Microsoft.SharePoint.IdentityModel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' from configuration.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.