Getting the error while setting up the environment for K2on prem

  • 26 March 2024
  • 5 replies

Userlevel 2
Badge +4

Hi guys 

I am facing so many  errors while setting up the environment for the k2 on prem if you guys could really help me it would be greatly appreciated 

so the errors are like

Object reference not set to an instance of an object.

   1. at IIS7WebFunctions.GetAuthMode(String siteName, String virtualDirectory)
   2. at SourceCode.SetupManager.Config.SetLegacyAuthVars() SourceCode.SetupManager.Config.SetWebVariables()
   4. at SourceCode.SetupManager.Config.EnsureImportantVariables()
   5. at SourceCode.SetupManager.UI.Panels.ComponentPanel.ExecuteComponents()
   6. at SourceCode.SetupManager.UI.Panels.ComponentPanel.FinishPanel()
  7.  at SourceCode.SetupManager.Main.navigateNext()


please help me 

5 replies

@Sneh bharti, which K2 Five version did you use? Is this a new clean install or upgrade to a new version?

Userlevel 2
Badge +4

@blackfantasy mine is version 5.7 


@Sneh bharti did you do a clean install (fresh installment) or did you upgrade from the previous version, for example, upgrade from v5.6 to v5.7? Does the setup manager finish configuring and were the errors found when you ran the K2 configuration analysis?

Usually the errors occur when you do the upgrade or patch, not from a clean install. The  errors that you experienced are related to the authentication method on IIS.

Please do check both web.config files on “C:\Program Files\K2\K2 smartforms Runtime” and “C:\Program Files\K2\K2 smartforms Designer”. Make sure there are no duplicate values for certain tags and no misplaced tags, for example:

    <section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <section name="" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <!--this is the duplicates value and must be commented <section name="sourceCode.identityModel" type="SourceCode.Security.Claims.Web.Configuration, SourceCode.Security.Claims.Web, Version=, Culture=neutral, PublicKeyToken=16A2C5AAAA1B130D"/>-->


if you find duplicate values, just convert them into a comment. For misplaced tags, just re-arrange to the right ordering position.

Userlevel 2
Badge +4

Hi @blackfantasy 

I am doing the fresh installment from the scratch.

Userlevel 3
Badge +10

Base on the stack trace of that error, it looks like it is maybe looking for the authentication mode for the K2 website.

IIS7WebFunctions.GetAuthMode(String siteName, String virtualDirectory)


What version of Windows Server are you installing on?  Is it one of the supported version listed below?


Do you have the following windows Roles and Features added?

Specifically the Security Features > Windows Authentication.