Web Application and Windows Application working together


Terry Holland

We are developing an ASP application for our organisation's intranet. Part
of the application is a scanning facility to allow users to scan documents
onto Customer records. As I see it we have a couple of options.

1) encapsulate the scanning functionality within a windows user control and
place this control onto a webform using the <object
classid="MyUserControl.dll#MyUserControl.MyUserControl1"> tag
2) program the scanning functionality into a winforms app

For option 1 to work, I would have to set up a trust zone that allowed code
from my scanning page to access hardware on the local pc. This is not an
attractive option as we are intending to sell this product to other
organisations and it may be the case that they would not allow such a trust
relationship to be created.

For option 2 to work, I would need to come up with a way of allowing the
users to seamlessly switch from asp application to windows scanning
application. The idea that Ive got in mind is as follows
Creating page in ASP application with Scan button. When the button is
clicked, a file containing Customer (CUSTOMER.xml) data would be saved to
client PC
Creating a winforms scanning application (SCAN_WIN) that is installed on
client PC
Creating a windows service (SCAN_SERVICE) installed on client pc) that
waits for such a client file to be saved on the client PC. When file is
detected, the SCAN_WIN application would be opened and it would load
Customer data from the CUSTOMER.xml file.

Ive got a few specifics that I would welcome somw opinions on but would
gladly take advice on any other related matters

a) Im just starting to explore this scenario and it seems to make sense that
the SCAN_SERVICE application uses a FileSystemWatcher object to monitor a
directory on local machine. It also makes sense for the ASP application to
save the CUSTOMER.xml into IsolatedStorage. What Im not sure about is how
to have the FileSystemWatcher monitor IsolatedStorage.

b) Im not sure if 3 different applications can access the same
IsolatedStorage area. Is this possible

c) If we were to go down the route of windows control on webform, would the
MyUserControl.dll be downloaded to client pc each time page was accessed (it
would be quite large)?

d) If we were to go down the route of windows control on webform, would
there be an 'acceptable' method of doing this in relation to security and
trust zones





bruce barker

for the browser to write to isolated storage it would have host an
active/x or .net control with proper trust set. you might as well do
option 1. the only way for the web application to have the browser save
a file is via the content header which will cause the save-as dialog to

you coud have the winform app host a browser session.

-- bruce (sqlwork.com)

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question