The Dynamic Web TWAIN service is the local bridge between browser applications and scanners. The first time a user visits a web scanning app built with Dynamic Web TWAIN, they're prompted to install this service so scanning can work. In some scenarios, you may want tighter control: ship the service inside your own installer and manage its lifecycle directly (start/stop) from your C# application. This article shows how to wrap and programmatically launch and shut down the Dynamic Web TWAIN service using the Dynamic Web TWAIN REST .NET project.
Scannning Documents in the Dynamic Web TWAIN Online Demo
The free online demo shows end‑to‑end document scanning, image processing, and upload directly in the browser. On first visit, the user is prompted to install the Dynamic Web TWAIN service to enable access to local scanners.
After installation, the service runs in the background and enables seamless scanning until explicitly stopped.
Controlling the Service from C
Dynamsoft has retired the legacy .NET TWAIN SDK and released Dynamic Web TWAIN REST .NET project as its replacement. This repository lets you bundle the Dynamic Web TWAIN service and control its lifecycle programmatically.
- 
Open Dynamic-Web-TWAIN-REST-dotnet\Samples\WinFormsAppin Visual Studio. The sample mimics the original .NET TWAIN WinForms experience.
- 
Start the service with the default (fixed) port so web pages can connect predictably: 
 _serviceManager.CreateService(true);Passing trueforces use of the default port. Omitting it selects a random available port, which a web page cannot reliably discover.
- 
Verify the service is running in Task Manager. 
 





 
    
Top comments (0)