I have a SilverlIght 4 project i wrote to interact with client document scanner and scan a document from the device.
This runs perfectly when i run silverligth project.
But When i add this Silverlight to my Web Application.
I get this error
This operation is not supported in the current context.
And when i debug, I notice the problem is with
dynamic wiaDialog = AutomationFactory.CreateObject("WIA.CommonDialog");
For any AutomationFactory.CreateObject(); it is failing.
Not sure, How to fix this, I looked online everyone is talking about OOB settings I have all that configured correctly.
Any suggestions would be a great healp.
Platform: Silverlight 4, VS2010, ASP.Net MVC 3.0 razor
To use automation factory inside web browser you need to enable this feature on client machines, see the link on MSDN How to: Enable Trusted Applications to Run Inside the Browser. But this works only for SL5. In SL4 automation factory can be used only when application will be installed (OOB mode), see another link How to: Use Automation in Trusted Applications: