Here, I am going to explain about the browser hosted page to get content into WPF Browser Application.
Here's the process,
- First thing I created my Web Application into MVC 5 with C# and i hosted this application in IIS.
- I am sending the file name as a query string from Web Application to WPF Browser Application.
- I created the WPF Browser Application for scanning the documents from scanner check the below link to more details about WPF browser Application for scanner Click here to check the WPF solution.
- Just deploy and Host both application to different places.
- Now finally will see how to get the file name or any variable as query string which you are sending from WebApplication to WPF Application.
Here's the code,
This code you have to write on view page in mvc 5 or else you can use aspx to send the file name.
- <body>
- <div>
- <iframe src="http://localhost:100/[email protected]" width="1000" height="600" scrolling="auto"></iframe>
- </div>
- </body>
- //get the filename from query string
- string RawUrl = BrowserInteropHelper.Source.AbsoluteUri;
- Uri myUri = new Uri(RawUrl, UriKind.RelativeOrAbsolute);
- string param1 = HttpUtility.ParseQueryString(myUri.Query).Get("Param");
For More details you can follow below links,
- Scan File From Scanner Using Flatbed And ADF With Windows Image Acquisition (WIA)
- Create WPF Browser Application to Scan a Document from Scanner(ADF and Flatbed) Using WIA
If you have any doubt or query you can reach to me any time by email or comment here.

Sonu ChaudharyPosted Jun 7, 2016, 12:43 PM
good one article