Clear Filters
Clear Filters

Can't use webapp server - getting "access denied to webapp.config file" error

64 views (last 30 days)
I’ve successfully installed the webapp server as defined in MW documentation. I was able to open the webserver home-page and run the available ctf files. Initially I was using the default accounts (MwWebAppServerR2024a, MwWebAppWorkerR2024a). Later when I tried to change to local accounts, I stopped the service, hit ‘unregister’. However, now I can’t ‘register’ again, neither using the default account nor with local account. See the error msg below when I click ‘register’:
I can confirm that:
1. I am running the C:\Program Files\MATLAB\MATLABWebAppServer\R2024a\application\MATLABWebAppServer.exe as administrator
2. The specified file has full security access for all users as you can see here:
3. I tried to uninstall and reinstall the webapp server, but it did not solve the access problem.
Any help would be highly appreciated

Answers (1)

Aravind
Aravind on 18 Sep 2024 at 5:31
Hi @Amir,
I have also managed to replicate this issue in MATLAB R2024a. It appears to be a bug in the Development version of the MATLAB Web App Server. The problem seems to occur when you unregister services set up with a local account, as it does not clear out the permissions properly, leading to the "Access denied" error. As a workaround, you can try the following steps:
1. Install the MATLAB Web App Server product (not the development version) by following the steps in the MathWorks documentation link: https://www.mathworks.com/help/releases/R2024a/webappserver/ug/install-or-uninstall-matlab-web-app-server-product.html.
2. After installing the MATLAB Web App Server product, navigate to the folder containing the MATLAB Web App Server command-line scripts. The default location for MATLAB R2024a is: “C:\Program Files\MATLAB\MATLAB Web App Server\R2024a\script”.
3. Open the Windows Command Prompt with administrator privileges in the above folder and run the following command:
webapps-setup
4. Use the default options for all information requested by pressing the Enter key whenever user input is required. This will set up the MATLAB Web App Server with default accounts.
5. Once the setup is completed, run the following command:
webapps-uninstall
This will properly clear out all the services and accounts and reset the permissions of the configuration files.
6. After this, you can open the Development version of the MATLAB Web App Server (with administrator privileges) and see that you can register the services again with the default or local accounts.
Note that you will have to perform steps 2-5 each time you unregister the services set up with a local account in the Development version of the MATLAB Web App Server to prevent the “Access denied” error.
Alternatively, you could also use the MATLAB Web App Server product instead of the development version to run the server. It does not seem to have the bug causing the “Access denied” error. More instructions on how to do so can be found at the MathWorks documentation link: https://www.mathworks.com/help/releases/R2024a/webappserver/ug/set-up-matlab-web-app-server.html. Note that the MATLAB Web App Server product has only a command line interface. The differences between the two can be found at the following official documentation link: https://www.mathworks.com/help/releases/R2024a/webappserver/ug/matlab-web-app-server-differences.html.
Hope this helps.

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!