andrew.beals@nintex.com

Nintex and web.config files

Blog Post created by andrew.beals@nintex.com Support on May 19, 2016

Preface

There is never a shortage of questions around how web.config entries are added and why they don't get added to particular servers. We at Nintex follow the Microsoft supported guidelines in regards to updating the web.config. You can find that information here: Working with Web.config Files

 

How does this process work?

Our product updates the web.config files on servers using the SPWebConfigModification class of the Microsoft.SharePoint.Administration namespace, which allows you to dynamically register entities. These modifications are persisted in the configuration database where they function as a kind of virtual web.config that effectively serves as the final layer of the .config file stack for the SharePoint Foundation web application. The changes become effective when the SPWebService.ApplyWebConfigModifications method is called.

 

What does this process do?

The web application activation piece for Nintex Workflow and Nintex Forms adds the following entries to the web.config using the above method:

<SafeControl Assembly="Nintex.Forms.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c52d764dcf7ec883" Namespace="Nintex.Forms.SharePoint.WebControls" TypeName="*" Safe="True" SafeAgainstScript="False" />

      <SafeControl Assembly="Nintex.Forms.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c52d764dcf7ec883" Namespace="Nintex.Forms.SharePoint.WebParts.InitiateWorkflow" TypeName="*" Safe="True" SafeAgainstScript="False" />

      <SafeControl Assembly="Nintex.Forms.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c52d764dcf7ec883" Namespace="Nintex.Forms.SharePoint.WebParts.NFListFormWebpart" TypeName="*" Safe="True" SafeAgainstScript="False" />

    

<add expressionPrefix="NFResources" type="Nintex.Forms.SharePoint.NFResourceExpressionBuilder, Nintex.Forms.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c52d764dcf7ec883" />

     

    <authorizedType Assembly="Microsoft.SharePoint.WorkflowActions, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WorkflowActions" TypeName="HTLookupActivity" Authorized="True" />

        <authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Collections.Generic" TypeName="List`1" Authorized="True" />

        <authorizedType Assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Collections.Generic" TypeName="List`1" Authorized="True" />

        <authorizedType Assembly="Nintex.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" Namespace="Nintex.Workflow.*" TypeName="*" Authorized="True" />

        <authorizedType Assembly="Nintex.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" Namespace="Nintex.Workflow" TypeName="RunNowParameterOptions" Authorized="True" />

In addition, following web.config safe control entries are added during solution deployment of Nintex Workflow:

  <SafeControl Assembly="Nintex.Workflow.ServerControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" Namespace="Nintex.Workflow.ServerControls" TypeName="*" Safe="True" />

      <SafeControl Assembly="Nintex.Workflow.ServerControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" Namespace="Nintex.Workflow.ServerControls.WebParts" TypeName="*" Safe="True" />

NOTE: This does not include the Nintex Live web.config modifications

 

Conclusion

Nintex leverages in place methods to ensure this process works without causing any unsupported updates to the web.config file. The updating of the web.config is executed by SharePoint code (more specifically the “Windows SharePoint Services Web.Config Update” timer job).

 

If you are seeing web.config entries not being added to a single server then I would recommend reviewing any issues with that web.config file or the server in question.

 

Cheers,

Andrew Beals

Outcomes