Simply I want to use scanner in client side in DMS (Document Management System) web application. I have searched the Internet for solution but I found it very expensive for me so I decided to write a free one.
I found some articles in CodeProject like .NET TWAIN image scanner By NETMaster. That's nice. That is my goal:
- Rewrite NETMaster's application to be in one Windows form, make it automated and find way to deploy it in web page.
- Call this application from your web page.
- Upload the acquired image to server in simple way.
But this code will not work with Windows XP sp2 :( So use this one:
<input onclick=runApp() type=button value="Scan XP sp2 users" name=button1>
var shell = new ActiveXObject("WScript.shell");
shell.run("c:\\tztwain\\tztwain.exe", 1, true);
Step 3: You can use FTP or simply web service like me.
- Configure testScan and FileUploadWS in IIS.
- FileUploadWS: Change save location.
- TestScan: gives write permission to users (ASP.NET, IWAM and IUSR) at upload folder.
- Change web reference in testdotnettwain to localhost. Then build it and ZIP the exe file with winrar and make it sfx (with these options).
Overwrite=1) then put the tztwain.exe in c:\inetpub\wwwroot\testScan.