3

I have windows application in c#.that is installed for client . I need run that window application from client side when user button click in asp.net web application

Explanation

I have task that scan hard copy from scanner . I developed web application in asp.net c#. I have search in Google to do this so many peoples are saying that is not possible due to permissions. so I developed windows application when I run that window application(c#) it scan the hard copy from scanner this window application run in background so I need to run this window application. when user button click in asp.net web application

2 Answers2

0

You cannot run applications from a website on client's machine due to security & permissions.

However, your website probably can communicate with the scanner. Check this detailed answer.

Community
  • 1
  • 1
Racil Hilan
  • 24,690
  • 13
  • 50
  • 55
  • yes. but that windows application also developed by me. so any possibility – E.Sharath Narayana Oct 05 '15 at 04:18
  • It does not matter who develops the app. The browser will block it. However, if the client machines are under your control (e.g. internal company computers), then you can set your app to be trusted and you will be able to call it from your website. Check the link in my answer for a way to communicate with the scanner from your website without a need for an app, which is what you were trying at the beginning. – Racil Hilan Oct 09 '15 at 14:44
0

While you cannot run the application from the browser, there is another option, if your application is already running in the background. Then you can make it listen to some local port and then ask the browser to redirect to the URL (consisting of localhost and that port, e.g. http://localhost:34554), so the application would receive an HTTP request and will know it needs to become active / show its window / etc. Using this technique, you could even pass some parameters to your application using query params in the URL.

Another option that allows you kinda run an application from the browser is Microsoft ClickOnce - it is just a simplified way of installing and running an application without the need for the user to download and manually run the installer.

torvin
  • 6,515
  • 1
  • 37
  • 52