This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, June 20, 2013 9:20:46 PM(UTC)
Groups: Registered
Posts: 2
Hello,
This is regarding post 40466 "Scanning with TWAIN in Silverlight 5 in-browser application".
I did all the instruction but I am getting error.
In Test_COM_TWAIN_SL5 project at this line:
twainSession = AutomationFactory.CreateObject("Leadtools.TwainCOMWrapper");
In TwainCOMWrapper project crashing at this line:
_twSession = new TwainSession();
Error:
Failed to create an object instance for the specified ProgID.
at MS.Internal.Error.MarshalXresultAsException(UInt32 hr, COMExceptionBehavior comExceptionBehavior)
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.ComAutomation.ComAutomationNative.CreateObject(String progID, IntPtr& nativeObject)
at MS.Internal.ComAutomation.ComAutomationServices.CreateObject(String progID, ComAutomationParamWrapService paramWrapService)
at System.Runtime.InteropServices.Automation.AutomationFactory.CreateObject(String progID)
at Test_COM_TWAIN_SL5.MainPage..ctor()
What is wrong ? I am using VS 2012.
#2
Posted
:
Sunday, June 23, 2013 4:42:48 AM(UTC)
Groups: Registered
Posts: 256
Hello,
Our moderator has split your post into a new thread.
I have tested on Windows 8 with LEADTOOLS v18 and MS-VS2012. The project worked correctly for both In-browser and Out-of-browser modes.
Please answer the following questions:
1- Did you run the Visual Studio "As administrator"? If you didn't, please run it "As Administrator" and see if you still face the issue.
2- What is the LEADTOOLS version you are using (17.0, 17.5, 18, ..etc)?
3- Did you follow all the project's setup steps listed in the project’s thread?
#3
Posted
:
Sunday, June 30, 2013 11:29:12 PM(UTC)
Groups: Registered
Posts: 2
Hi,
I have test this project in several machines and everywhere I (and other developer) got the same result.
1. Yes. I am running "As Administrator"
2. I am using 18.0 version.
3. Yes. I followed all the instructions.
I am using Win7 and VS2012.
xdonatas attached the following image(s):
#4
Posted
:
Tuesday, July 2, 2013 7:15:34 AM(UTC)
Groups: Registered
Posts: 256
I test at my end as follows:
1- Installed MS-Visual Studio 2012 and installed Silverlight 5 Developer on a fresh Windows 7 64-bit machine.
2- Installed the latest LEADTOOLS v18 setup.
3- Copied the "Silverlight 5 Twain" project to the Machine.
4- I ran the command line "As Administrator" and typed "regedit" to start the registry.
5- HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Silverlight\ (since it is 64-bit machine).
6- Right-click on "Silverlight" on the left hand side and choose New->DWORD (see 1.png).
7- Name the new entry "AllowElevatedTrustAppsInBrowser" and modified its value to 1 (see 2.png).
8- I ran VS2012 "As Administrator" and opened the project "Silverlight 5 Twain".
9- Right-click on "Test_COM_TWAIN_SL5" ->Properties.
10- Selected "References Path" tab, Added the path to [LEADTOOLS 18]\Bin\Silverlight4\
11- Selected "Signing" tab, made sure that "sign the Xap file" box is checked.
12- Clicked on "Create Test Certificate" button and choose a password and click OK.
13- Clicked on "More Details… -> Install Certificate". In the window that comes up, clicked "Next" and then selected "Place all certificates in the following store". I browsed for the "Trusted Publisher" store and Finish.
14- Repeated step 13 and selected "Trusted Root Certification Authorities" store. Note (do NOT create a new test certificate. Just click "Install certificate button in the window that appeared in step 13).
15- Selected "Silverlight" tab, enabled "Out-of-browser settings" button by checking "Enable running application out of browser" check box, then clicked the button and checked "Require elevated trust when running outside the browser" in the new window that appears.
16- Disabled the "Out-of-browser settings" button and checked "Require elevated trust when running outside the browser".
I built and ran the project and it worked great.
I tested again using out of browser settings by checking "Enable running application out of browser" check box and rebuilding the project and running it again.
Did you test using these exact steps? If yes, please check the registry editor for "AllowElevatedTrustAppsInBrowser" before running the project again.
If you are not using these steps, please try testing again using these EXACT steps.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.