TWAIN redirection does not work for applications running in an Application Isolation Environment. When an application running in Application Isolation Environment requires TWAIN support, the following error message is displayed:
“TWAIN error!
Can't connect to device or the TWAIN driver is not installed!”
Note: This error message is not seen when the application is published outside of Application Isolation Environment.
Cause
Citrix Presentation Server hooks TWAIN communication used by a published application and passes it to the TWAIN Redirector (TWNHOOK.dll). The TWAIN Redirector eventually transfers the data to the TWAIN driver (TWAIN_32.dll) which resides on Presentation Server Client through ICA virtual channel. This is how Presentation Server detects TWAIN devices that are attached to client device.
When such an application is running in an Application Isolation Environment, certain named objects implemented by TWAIN redirector cannot be created properly. This results in a failure to transfer TWAIN data.
Resolution
To enable TWAIN redirection for applications running in Application Isolation Environment, use the following steps:
1. Create a new Application Isolation Environment using the Management Console by right-clicking the Isolation Environment node on right pane and selecting New Isolation Environment and providing a name of your choice.
2. Right-click the newly created Application Isolation Environment on the left pane and select Properties.
3. In the Properties dialog box select Rule entry on the left pane and click Add on the right pane to add a new rule with New Rule Wizard.
4. Select the following options on Rule Type at New Rule Wizard
Action field: Ignore
Object field: Named objects
5. Click Next.
6. Select the following options on Ignore Named Objects
All named objects (Default)
7. Click Next followed by Finish.
8. In properties dialog box select Security on the left pane.
9. Select Relaxed security and click OK.
10. Publish the application for which TWAIN support is required into the Application Isolation Environment created in Step 1. Make sure that you select the option Isolate Application and select the Application Isolation Environment created when publishing the application in the Application Isolation Environment.