Web browser Control under Citrix environment - ms-office

I have a web application which is also displayed in a web browser control of a winforms application. MS Word and Excel are installed on Citrix server.
But I want to open a word/excel document on client's machine instead of Citrix server when I click a link on the website (which is displaying in web browser control)
Is it possible?

Citrix supports a mechanism called Content Redirection which can redirect specified filetypes either to server or to client.
See this Server-to-client Content Redirection Explained for an explanation.

In order to communicate with the client computer, you will need to have software running on the client computer to accept and interpret commands from the hosted application.
We had something similar here. Clients needed a way to print to a special printer (for whatever reason the printer was not compatible with citrix). We had to create a "listening" app for the client computer and modified the hosted app to send commands via winsock\tcpip. So when a print job was requested, the hosted app sent command data to the listening app on the client and the client actually started the print job.

Related

Is it possible to make a local client web page request data from a server by domain?

I am trying to make a communication between the server and the client (client is an html webpage which is locally installed on their computer) and that the client will request data from the server by its own name known to the internet (like a web domain) since my server will only handle data and not really be a website.
Note: My server will be a hosted web server since i don't want to use my own pc as a server at the moment.
for example:
On the client:
code: let Xcoordinate = askdata(myserver.com, Player1.XCoordinate)
On the Server:
code: server.onrequestdata(data){
if(data==Player1.Xcoordinate){
ReturnData(Player1.Xcoordinate)
};
};
This is just an example. But i wanted the code way to be something like that since the client's webpage is on their computer installed directly. For now I'm not really concerned about the security communication between the server and the client.
So my main question if it is possible? And what programming language can I use? At least compatible with Html or webpages.
I have been trying to search about some programming languages I can use but did not really find any in such way of code.
I found node.js and PHP but I did not find any code that happens to go with such way that I want to communicate the server and the client with.

Code is working fine locally, but not execute after hosting

I am using dot net core 2.1.
when I execute local code Process.Start("C:/Windows/notepad.exe"); it is working fine.
But when I hosted my code on IIS it is not working.
I already give all the permission.
If you want to open the client machine's notepad, it's impossible. The process start will just open the server's nodepad.
Since the client side browser will just get the server's reponse which is the html codes and show it. The process start is running on the server-side not client side.
The reason why you could open the nodepad is the client and server is the same machine.

How to create web based terminal using xterm.js to ssh into a system on local network

I came across this awesome library xterm.js which is also the base for Visual Studio Code's terminal. I have a very general question.
I want to access a machine(ssh into a machine ) on a local network through a web based terminal(which is out of network, may be on a aws server). I was able to do this in a local network successfully but I could not reach to a conclusion to do it from Internet-->local network .
As an example - An aws server running the application on ip 54.123.11.98 which has a GUI with a button to open terminal. I want to open terminal of a local machine which is in a local network somewhere behind some public ip on local ip 192.168.1.7.
Can the above example be achieved using some sort of solutions where i can use xterm.js so that I don't have to go for building a web based terminal? What are the major security concerns I should keep in mind while exposing the terminals this way ?
I was thinking in line with using a fixed intermediate server between AWS and local network ip and use some sort of reverse ssh tunnel process to do this but I am not sure if this is the right way or could there be a more simple/better way to achieve this.
I know digital ocean, google cloud , they all do this but they have to connect to a computer which has public ip while I have a machine in a local network. I don't really want to configure router to do any kind of setup .
After a bit of research here is working code.
Libraries:
1) https://socket.io/
This library is used for transmit package from client to server.
2) https://github.com/staltz/xstream
This library is used for terminal view.
3) https://github.com/mscdex/ssh2
This is the main library which is used for establishing a connection with your remote server.
Step 1: Install Library 3 into your project folder
Step 2: Start from node side create a server.js file for open socket
Step 3:
Connection client socket to node server (both are in local machine)
The tricky logic is how to use socket and ssh2.
On emission of socket you need to trigger an SSH command using the ssh2 library. On response of the ssh2 library (from server) you need to transmit the socket package to the client. That's it.
Click here to find an example.
That example will have these files & folders:
Type Name
------------
FILE server.js
FILE package.json
FOLDER src
FOLDER xtream
First you need to configure your server IP, user and password or cert file on server.js and just run node server.js.
P.S.: Don't forget to run npm install
Let me know if you have any questions!
After some research later I came across this service : https://tmate.io/ which does the job perfectly. Though if you need a web-based terminal of tmate you have to use their ssh servers as a reverse proxy which ideally I was not comfortable with. However, they provide tmate-server which can be used to host your own reverse proxy server but lacks web UI. But to build a system where you have to access a client behind NAT over ssh on web, below are the steps.
Install and configure tmate-server on some cloud machine.
Install tmate on the client side and configure to connect to a cloud machine.
Create a nodejs application using xterm.js(easy because of WebSocket based communication) which connects to your tmate-server and pass commands to the respective client. (Beware of security issues of exposing this application, since you will be passing Linux commands ).
Depending on your use case you might need a small wrapper around tmate client on client-side to start/stop it automatically or via some UI/manual action.
Note: I wrote a small wrapper on client-side as well to start/stop and pass on the required information to an API server (written in nodejs) which then pass on the information to another API which connects the browser to the respective client session. Since we had written this application it included authentication as well as command restrictions of what can be run on terminal. You can customize it a lot.

WinJS App - Not able make ajax request using WinJs.xhr

I'm developing a simple app using WinJS for Windows 8 and 10. The app makes an Http request using Winjs.xhr.
I developed Web API hosted on a server with CORS enabled into that. Now, when I install my Win app in development machine (where API(s) are hosted), Win App is able to download the data.
On remote computer it fails. It executes error code block and returns readyState=4, status=0.
See detail description of problem I'm facing here
Finally Solved after spending my 3 days behind this searching everywhere.
I have been using http://192.168.4.134:9084/.... URL for sending the request. Initially, I had set app capability to Internet(client) and Internet(client & server). Later while rethinking I realized that since it's routed through network, I may also require Private Network (Client & Server) to be checked marked.
for now this has solved the problem, and created a question that "Do I need to check mark it when I will publish it for store?"
Another off topic question, How to sideload this app in all computers at once assuming that all those PCs are connected with single AD server under one domain?

Fiddler4 not capturing traffic (FME -> CouchDB)

I love Fiddler, and it is a mainstay for my web debugging. It is working fine for all my browser based activities. But right now, I am having a login issue with CouchDB. I am using a desktop software called SAFE FME, which provides login and bulk upload to the CouchDB server. From the browser I can login to the CouchDB, so that did not seem the problem.
All I want to do is see the traffic going between the FME and the CouchDB server.
CouchDB is running on http://localhost:5984/
computer is windows 7, 64 bit. Both Couchdb and FME are local to the computer
I have Fiddler setup for:
Capture Traffic true
Any Process
Any idea why I am not capturing the data
You're probably not capturing the data because SAFE FME doesn't use the system proxy setting.
Open FME Workbench. From the menu select Tools|FME Options then select Network and check Use Proxy. Ref: https://knowledge.safe.com/articles/How_To/Configure-FME-Desktop-to-connect-through-your-proxy-server
The Fiddler proxy runs on 127.0.0.1 port 8888.

Resources