This project has moved. For the latest updates, please go here.

need help with WebSample example

Dec 8, 2015 at 11:08 AM
When i try to add the files of the web site to an external website of mine iam getting this error

(Could not load file or assembly 'file:///C:\Users\mwafy\AppData\Local\Temp\59ca4097-dca0-48fc-92e3-49f998b7cf98\Saraff.Twain.WebSample.dll' or one of its dependencies. The module was expected to contain an assembly manifest.}

The files iam attaching in my website are
(Saraff.Tiff.dll, Saraff.Twain.dll, Saraff.Twain.WebSample.dll,,TwainHandler.ashx and index.htm)
Dec 10, 2015 at 5:50 PM
Hello, AbdelrahmanMostaf.
Make sure the files (Saraff.Twain.WebSample.dll, Saraff.Twain.dll and Saraff.Tiff.dll) can be obtained by GET request. Make sure that the version of the Saraff.Twain.dll and Saraff.Tiff.dll assemblies match those specified in the Saraff.Twain.WebSample.dll assembly.
Jan 23, 2016 at 7:56 AM
dear saraff
how can do that works .
how can sure these files (Saraff.Twain.WebSample.dll, Saraff.Twain.dll and Saraff.Tiff.dll) can obtained by GET request.
how can check maching between these dlls
i have windows 7 professional...
Jan 24, 2016 at 9:42 AM
Hello, hjeishi1360.
download fullsize image
  • Build solution, build Saraff.AxHost.Setup.
  • Copy, Saraff.Twain.WebSample.dll, Saraff.Twain.dll, Saraff.Tiff.dll to Saraff.Twain.WebSite
  • Click "View in Browser"
  • Configure a browser according to the instructions (add to trusted sites; allow download unsigned ActiveX (for trusted sites); allow ActiveX, not marked as safe (for trusted sites))
Additionally can check:
  • Saraff.AxHost version and CLR Runtime Version (2.0 or 4.0)
    Check in a regedit follow node
    HKEY_CLASSES_ROOT\CLSID{83368D28-D24A-4543-9B1A-6D7B0152C54F}\InprocServer32\ (on windows x86)
    HKEY_CLASSES_ROOT\Wow6432Node\CLSID{83368D28-D24A-4543-9B1A-6D7B0152C54F}\InprocServer32\ (on windows x64)
  • GET request (for, Saraff.Twain.WebSample.dll, Saraff.Twain.dll and Saraff.Tiff.dll)
    Try write in browser URL to a files
Marked as answer by SARAFF on 1/24/2016 at 10:04 AM
Jan 24, 2016 at 1:27 PM
dear saraff
I do these Works :
1-build Saraff.twain.Setup to create Saraff.Twain.Cab with framework 4
2-build Saraff.twain.AxHost to Create Saraff.AxHost.dll with framework 4
3-build Saraff.Tiff to Create Saraff.Tiff.dll with framework 4
4-build Saraff.Twain to Create Saraff.Twain.dll with framework 4
5-Add (Saraff.AxHost.dll,Saraff.Tiff.dll, Saraff.Twain.dll) to Saraff.WebSample and buid Saraff.WebSample.dll with framework 4
6-Copy Saraff.Twain.Cab , Saraff.Tiff.dll , Saraff.Twain.dll , Saraff.WebSample.dll to WebSite folder [i build web site with framework 4]
7-View in Browser Index2.htm
8-add localhost in Trusted Site (with "allow download unsigned ActiveX" ) [ i do not found "allow ActiveX, not marked as safe" in Custom level of Trusted Sites]
9-check registry :my Registry have true version
10-Get Request: I type All dll in Browser URL and i saw Open Save toolbar.[but i can not save or open dll because of security warning]
i get AxHost.object is null yet;[ in LoadScanComponent() method of index2.htm]
Jan 24, 2016 at 3:00 PM
dear saraff
i solved it
i change all framework from 2.0 to 4 but framework version of Saraff.AxHost.Setup .i change this framework to 4.0 and then i can scan with your brilliant dlls
thanks a lot
Feb 15, 2016 at 10:03 AM
I am using VS2013 on Win8.1 64 bit
I am trying to run Web Sample and faced problem and i tried to solve:
1- Over 60 error because of some references missed >> Add requested references
Result: No Error
  • I make all Security Settings (Localhost as atrusted web sites and customizet this level as requested)
  • I checked dlls from browser and i van open and save

Folders in Side Solution Status:

Saraff.AxHost (unavailable)
Saraff_AxHost.Setup (incompatible)
Saraff.Tiff (unavailable)
Saraf.Twian (unavailable)
Only Saraff.Twain.WebSample and Saraff.Twain.WebSite has Files

I tried to change .Netfarmework
Result: No Data Source Displayed
Feb 15, 2016 at 10:09 AM
Edited Feb 15, 2016 at 1:28 PM
Is that mandatory to put TWAINDSM.dll in System32 Folder
Note:I put it is that place
I did not find the program in 83368D28-D24A-4543-9B1A-6D7B0152C54F in REGEDIT

Question: is this library work only in Internet Explorer
Feb 16, 2016 at 6:48 PM
Hello, Manooo.
Source files (or binary files) should be taken from sites related projects (Saraff.Tiff.NET, Saraff.AxHost.NET, Saraff.Twain.NET). It is necessary to use the latest versions of files.
It is assumed that you are familiar with the TWAIN, as well as possess the skills development of web applications.
You can review the documentation of Saraff.Twain.NET.
An Saraff.Twain.WebSamples can only run in IE, because it is based on ActiveX.