Symptoms
New workflow instances failing after upgrade to 4.6.8
Microsoft.Web.Infrastructure, Version=1.0.0.0
System.Web.WebPages.Razor, Version=2.0.0.0
Diagnoses
Yesterday the K2 blackpearl production server was upgraded to 4.6.8. There were some Kerberos issues which were resolved with help from K2 support. After that K2 components were upgraded on the SharePoint server without issues.
Today, new workflow instances are failing with the error “clrcompression.dll.” Also, K2 Workspace Error Profiles is not working.
Looking in the K2 hostserver log file, we see many instances of the below error:
"38589090","2015-01-29 14:27:37","Error","General","0","ErrorMessage","1","0 SharePointRoleProvider.GetGroups: System.Reflection.TargetInvocationException: An unexpected failure was encountered when contacting SharePoint to get information from the group provider Home: The SharePoint server has indicated that the web service could not be found. Consider updating the group provider configuration. ---> System.Net.WebException: The request failed with HTTP status 404: Not Found.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Objecte] parameters)
at SourceCode.SharePoint.WebServices.K2SPSites.IsClaimsSite()
at SourceCode.Security.Providers.SharePoint.Shared.SPWebServicesClient.get_IsClaimsSite()
at SourceCode.Security.Providers.SharePoint.Shared.SPWebServicesClient.SourceCode.Security.Providers.SharePoint.Shared.ISPGroupProviderClient.GetGroups(String userName)
--- End of inner exception stack trace ---","anonymous","0.0.0.0","blackpearl:C:Program Files (x86)K2 blackpearlHost ServerBin","38589090","4f91befd761145c2ae0c0178e4379376",""
In IIS on the blackpearl server, the identity service displays the following error:
Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
eFileNotFoundException: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
System.Web.Http.WebHost.SuppressFormsAuthRedirectModule.Register() 0
InvalidOperationException: The pre-application start initialization method Start on type System.Web.Http.WebHost.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) 12967707
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) 12967416
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Booleanand isRefAssemblyLoaded) 280
System.Web.Compilation.BuildManager.ExecutePreAppStart() 172
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) 1151
HttpException (0x80004005): The pre-application start initialization method Start on type System.Web.Http.WebHost.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) 12966756
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) 159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) 12806561
Resolution
The issue with the instance on error "clrcompression.dll" was resolved by installing the .NET MVC 3 which updated the 'Microsoft.Web.Infrastructure assembly". We retry an instance on error state and the error went away giving us the 404 Not Found error.
A second issue was found trying to access the identity app. Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0." This error got resolved by Installing the .NET MVC 4. We had to first update Visual Studio to SP1 and them install the MVC 4. After that we were able to browser the identity app.
The Error with the "The SharePoint server has indicated that the web service could not be found. Consider updating the group provider configuration" was caused because the Central Admin server was running 4.6.6 and the other WFE was on 4.6.8. After we installed 4.6.8 on the central admin server, deploy the solutions and activate the features, we were able to load the SharePoint Instance (We had to add the CommandTimeout key to the SMO runtime).
Once we set everything we tested the workflow and it was successful. We had to re ran the setup of K2 BlackPEarl 4.6.8 since I didn't see the Claims table in the K2 Database. We granted Db_Creator and Security_Admin Database role to the K2 service account before running the configuration.