Effacer les filtres
Effacer les filtres

How can I access a Matlab web app from another computer?

10 vues (au cours des 30 derniers jours)
Athanasios Kolios
Athanasios Kolios le 9 Fév 2019
Commenté : Søren Furbo le 23 Juin 2020
I have developed a Matlab web app through the app designer tool and have published it through the Matlab web server application. Although I can access the file through the link generated http://hostname:9988/webapps/home/session.html?app=app1 on my PC (same PC as the server), I cannot access it from a different computer (not even in the same network). Does anyone know how I can generate a link that I can share with people outside my network? I am trying to avoid using Matlab Production Server if possible.

Réponses (5)

Nozhan Hosseini
Nozhan Hosseini le 6 Jan 2020
I have the same problem. It should be really sad that this is only for local use. MATLAB please answer
  1 commentaire
Søren Furbo
Søren Furbo le 23 Juin 2020
Have you tested whether the computer accepts incoming traffic on port 9988? IIRC, it is usually blocked by Windows firewall.

Connectez-vous pour commenter.


Cris LaPierre
Cris LaPierre le 10 Fév 2019
You don't need MPS, but you do need the web app server. Have you reviewed the installation and configuration doc pages?
Instructions for creating a deploying a web app can be found here.
Instructions on how to run a web app can be found here. Make sure the web app server is running and is accessible on your network.
  3 commentaires
Cris LaPierre
Cris LaPierre le 10 Fév 2019
Modifié(e) : Cris LaPierre le 8 Jan 2020
I don't know the technical details. However, web apps are not designed to run on the open internet. From the documentation:
"Web apps are designed to run only within a trusted intranet environment, not in the open Internet."
If you have a current license, I'd suggest contacting technical support about getting info to run on your network. They can provide much more accurate information than I can.
Hassan
Hassan le 14 Avr 2020
Dear Athanasios Kolios,
Unfortunately, Matlab is a VERY BAD platform for web applications in general and in particular for internet deployed apps. I am facing the same problem, and I approach the technical support to solve this issue. Eventually, they managed to make a shareable link to the outer world. Sorry, I can't share my link as it is under revision.
Soon, after solving the link issue problem, you will face additional problems with speed, memory, maintenance and other issues that should be super trivial for web applications, such as maps and so. I contacted the local support of MathWorks, Europ engineers.. no answer. They just start telling me stories about things that they can do and ignoring my core questions.. waste of time.
My tip is to leave Matlab and invest your time in another tool for web applications. Although you will have a slow start, you will enjoy the benefits of it in the future.
Best, HM

Connectez-vous pour commenter.


abdulrahman al-sabaawi
abdulrahman al-sabaawi le 10 Août 2019
hellow dear
have solved this problem?

Walter Roberson
Walter Roberson le 7 Jan 2020
The URLs that you get with web apps are not inherently restricted to the local environment: it is just somewhat risky to expose them to the Internet.
The URLs that are generated reflect the local host name. If your host has a different external name, just edit the hostname part of the URL appropriately. I do not know at the moment whether the app will output the same hostname as the request was made for, so it is plausible that the index might not be directly usable if the external name does not match the internal name.
The URLs that are generated reflect the local port number. The network security must be configured to permit external access to that port on that host. It is acceptable for the network to perform Port Address Translation to accept a request on a different port number and forward it to the appropriate local port, but it is unlikely that the index will know to do appropriate rewriting.
In the case where the internal and external hostnames match and the internal and external port numbers match, then all you should have to do is (A) permit access to the port; (B) tell outside people what URL to use; and (C ) sit back and watch as your system gets hacked because you used str2num() and someone decides to type in a command in place of a number.

Søren Furbo
Søren Furbo le 23 Juin 2020
Modifié(e) : Søren Furbo le 23 Juin 2020
You need to replace "hostname" with either the IP address of the server or a recognized alias, and the server needs to accept incoming messages for port 9988.
By default, (IIRC), "hostname" is "localhost", which only works locally on the computer that is acting as web app server.
It is also very likely that your Windows firewall blocks port 9988, and that you network does as well.
As others have remarked, you need to secure the server, preferably by mkaing sure that the port 9988 is only accessible from your local network. If you don't, anyone on the internet can run your app, and if there are any security issues (which are very easy to make by accident), you risk exposing the entire computer to them.

Catégories

En savoir plus sur Web Apps dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by