Web form: Error "The specified path, file name, or both are too long"

Issue

When you launch a .NET web form created with Visual Studio you get an ASP.NET error: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters ...

Solution

This error can occur since version 5.6.1 if the WorkflowGen.My DLL used by the Visual Studio web form is not compatible and web apps secure mode** is enabled.

The solution is to upgrade the WorkflowGen.My DLL used in the web form’s \bin folder of the web form (see Setup: Web apps security: Workflow parameters secure mode), or to deactivate web apps secure mode in the Security section on the General tab of the Configuration Panel.