There may be scenarios where it is necessary to impersonate a different Windows Authentication user while performing a certain task. The most common scenarios are:
- On a Mi-Forms Client, the currently logged in user does not have sufficient privileges to perform a task.
- By default on the Mi-Forms Server, server-side scripting will be conducted as the local ASPNET user which has limited authority. This is in compliance with the Windows Server security model for IIS 6 and ASP.NET 2.0. For instance, if you are running SQL in Windows Authentication mode and cannot grant ASPNET permission to export to that database, use impersonation to accomplish this task. See illustration below...
The attached example form impersonates a different user while attempting to connect to a remote database via a SQL Server ODBC System DSN on the Mi-Forms Server.
Note: for server-side datapaths, it is currently not possible to impersonate a different user for standard datapaths defined in the Mi-Forms Designer form properties dialog. ( Standard datapaths are executed in a different app domain than form scripting. )