run windows application at client side from aspx.cs - javascript

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

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.

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.

Related

How enable google chrome browser to run local commands in Windows?

I am using a web development tool called Oracle APEX 21.1 to create an app which will run on the web for some users and as desktop app for other users. The application runs in a browser in both cases. My problem is with the users that will use it as a desktop app. Sometimes I need to run a local file or run a specific program from the computer the user uses to run the app. The user is instructed to use google chrome to use the app. My question is, is there a setting of google chrome that I can set to allow my app to access local files or run Windows commands? Is there any other way i.e an add-on? If not, is there any other browser that can do the job? P.S: In my app, I can make use of JavaScript, JQuery, Oracle PL/SQL. Of course, a browser simple setting to set is the best option for me, if any.
in browser you you have to do use "href" string like this :
window.location = "notes:///server/file";
"notes:///" program name
And "server/file" parameter for programe

Running terminal through the web browser

I'm struggling with some Web App recently and have a unusual question.
Is it possible to access terminal via the web browser? Let's assume that I have a button, and when I press it I want to have new terminal window appear.
Any ideas?
If you are running the web app locally, you can tell your server (PHP, ASP.NET, ...) to launch on calling specific url (eg: http://localhost:8080/open/terminal). You can even make a button click event to call that url in the background.
But that's dirty way of doing such things.
TIPS: If you wish to use web technology for desktop apps, use https://electronjs.org/

Possibility of running a local network server from the browser

This question is about the basic feasibility of this project but you are welcome to recommend ideas on how it could be done. I would like to create a hosted Java web application that creates a Server in the local network of the device.
For example: You can go to example.com in your Browser and start the application that creates a server in the local network of the device (Windows-PC). Other devices (Android) can connect to the server (UDP) with an installed Android-App.
Is this concept possible? I am afraid browser security renders this level of access impossible..
As others have pointed out it is not possible.
I will instead choose a local Java application that has to be installed.

Can I make a socket connection through Javascript

What I want to do
Make a simple socket connection to a server on the browser. I want to not send any header information with the socket connection.
The Problem
It looks like I am unable to make a socket connection with javascript that does not send header data (Is there a way to do a tcp connection to an IP with javascript?).
I thought maybe I could make a connection with a chrome extension, however it looks like the socket API is only available for chrome apps (Google Chrome Socket API in extensions).
I am thinking that I might need to make a native application that will make socket connections through requests made by the browser using Native Messaging.
Is there anyway I can achieve this or am I out of luck?
Raw socket connections through the browser are wrapped up in security concerns. Users can be easily manipulated to allow things to run that shouldn't.
TCP and UDP Socket API
W3C Editor's Draft 20 January 2016
is located here.
http://raw-sockets.sysapps.org/
Mozilla's API information here: https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/API/TCPSocket "This API is available on Firefox OS for privileged or certified applications only."
If you work with raw TCP connections. I would suggest
(1) downloading PHP onto the local computer. PHP has a developer web host build in so you can run whatever application you want on PHP using the browser as your GUI.
(2) download node.js.
You are not out of luck you just need to achieve it with the understanding that you are working outside the box for normal browser based scripting created from security concerns, and that means the user/client needs to install something manually.
If you must use chrome browser on the client side, you will need to make an -extension- correction webapp. You can as a developer make one that you can use on your own computers.
https://developer.chrome.com/extensions/getstarted
https://developer.chrome.com/apps/first_app
Load the extension#
Extensions that you download from the Chrome Web
Store are packaged up as .crx files, which is great for distribution,
but not so great for development. Recognizing this, Chrome gives you a
quick way of loading up your working directory for testing. Let's do
that now.
Visit chrome://extensions in your browser (or open up the Chrome menu
by clicking the icon to the far right of the Omnibox: The menu's icon
is three horizontal bars. and select Extensions under the Tools menu
to get to the same place).
Ensure that the Developer mode checkbox in the top right-hand corner
is checked.
Click Load unpacked extension… to pop up a file-selection dialog.
Navigate to the directory in which your extension files live, and
select it.
Alternatively, you can drag and drop the directory where your
extension files live onto chrome://extensions in your browser to load
it.
If the extension is valid, it'll be loaded up and active right away!
If it's invalid, an error message will be displayed at the top of the
page. Correct the error, and try again.
This insures that non developers don't load an extension which does not comply with the normal security concerns.
Communicating between with the script on the web page to the extension.
Can be done with message passing ... https://developer.chrome.com/extensions/messaging
The extension can add content directly to the web page which is available to the script on the web page. If for example the extension replaced the web cam image with a static image when the webcam script reads what it believes is the webcam it gets the static image instead, which explains why I look like an alien from space on the webcam. Although I did not create an extension to do that, I merely modified an existing extension to replace the function that gets the webcam image with a function to get a static image.
You can use SignalR, it is javascript library (JQuery Plugin) and it enables you to open web sockets from the browser to a server. Please check the following links:
https://blog.3d-logic.com/2015/03/29/signalr-on-the-wire-an-informal-description-of-the-signalr-protocol/
http://blog.teamtreehouse.com/an-introduction-to-websockets
https://github.com/SignalR/SignalR

Launching a desktop application from a browser(client web page)

I need to launch an application which is installed in the client machine when the user clicks the link in the client webpage from browser. for instance like launching the Goto meeting application from the client machine when clicking the URL link if installed else providing the download link.
I tried with ActiveXobject approach which works only with IE browser.And also check with FileAPI.
In the following link they mentioned about using Asynchronous Pluggable Protocol Handler. Since I'm new to it. Can you please guide me where to start.
Launch application from a browser
About the environment. My server application is in Asp.Net MVC platform.
Thanks in advance
Since the browser prohibits you from executing anything locally I think the best way to solve your problem would be to create Chrome/Firefox extensions.
Extensions are not bound and can be executed locally.

Categories