PDA

View Full Version : App Center permissions on server



SpringBox
2022-04-16, 12:46
Hi Guys

Just installed Lianja on Windows 2019 Server and all good except there is a permissions issue with the App Center.

Have attached a screenshot. Installed as Administrator so not quite sure what permissions would need to be changed.

Any thoughts?

Cheers


Simon

barrymavin
2022-04-16, 13:42
Hi Simon

How are you accessing that server? Native or using rdp?

You have no access to write to the temp folder by the looks of it.

SpringBox
2022-04-16, 14:22
Hi Barry

At the moment natively to mimic development pc. Which is the temp folder?

Was planning to use App Center then proper web access port 8001 access as we now have SSL certificate on server so iPad access should be fine.

Can you remind me of the web url we need to access it please?

https://domain.com:8001/login.php is that right? Not sure.

Cheers


Simon

HankFay
2022-04-16, 14:52
Hi Simon,

Make that login.rsp

Hank

SpringBox
2022-04-16, 16:38
Thanks Hank

You are a star !!

Lianja is a funny thing - you think you know VFP and this should be the same...

It isn't & can't be & its hard & then suddenly... it makes sense.

What an enormously capable toolset !!

As always PRACTISE PRACTISE PRACTISE !! (proper English spelling. A "practice" is where the doctor works)

Happy Easter :-)

Simon

barrymavin
2022-04-16, 20:35
Hi Simon

To use https on your server you need to install the Lianja IIS extension. You then omit port 8001 from the url.

Its all covered in the doc.
https://www.lianja.com/doc/index.php/ISAPI_Extension_for_IIS

SpringBox
2022-04-17, 07:21
Thanks Barry

Will get IIS sorted next week.

In preparation for that, we are still getting the permissions error when starting the App Builder.

Any idea which directory is the culprit? After the error the App Builder does start but we cannot deploy apps to the App Center.

Will try reinstalling.

Cheers


Simon

SpringBox
2022-04-17, 08:37
Reinstallation seems to have sorted the permissions issue in terms of loading App Builder

Cheers


Simon

Cheers

Simon

SpringBox
2022-04-20, 09:26
Hi Barry

Almost got to the end of the Lianja IIS setup but fell at the last. Windows server 2019 clean fresh install.

"Then, as an administrator, edit the web.config file for the site and add in the redirection to your existing configuration."

There is no web.config file in c:\inetpub\wwwroot. There are lots of other web.config files but their contents are completely different.

Any thoughts?

Cheers


Simon

yvonne.milne
2022-04-20, 11:23
Hi Simon,

Try making a change to the 'Default Document' feature (e.g. change the order) in the IIS Manager. It should then save the change to the web.config file, creating it if it does not yet exist.

Regards,

Yvonne

SpringBox
2022-04-21, 09:09
Thanks Yvonne

Tried that - makes no difference. Of course in IIS there is the PC and also the default site (both of which have near identical properties to change). In the example the changes are aimed at the Default Web Site so we hope that was the correct one to change.

It seems the web stuff will need a great deal more work to get it going. Our cloud infrastructure providers are scratching their heads too.

Permissions/accounts are as follows :

Server Manager account is using a domain admin account - full access

All the Lianja folder on drive C has modify access for all domain users

The c:\Temp folder (currently used for the vfp dbf target of the virtual table) - everyone - full access


We realise these settings will make most admins cringe but we are just trying to get things working.

These very loose permissions don't seem to make any difference.

**********************************

If we run App Centre manually on the server desktop or access it via RDP, it works fine but fails to export data from vt to vfp.dbf.

There were some command line switches for RDP in the past but we cannot find them or how to call login.rsp

If we try to run the web version http://domain.com:8001/login.rsp - it brings up the login screen but will not log in (browser console attached)

https://domain.com/login.rsp just won't connect at all despite carefully following the "how to".


Sorry about the long reply but we have tried everything we can think of. We are sure it shouldn't be this difficult.

Any thoughts as to the way forwards?

Cheers


Simon27992799

yvonne.milne
2022-04-21, 09:48
Hi Simon,


Tried that - makes no difference - do you mean no web.config file was created?

Can you show the output in the Network tab when you try to connect/login?

Regards,

Yvonne

yvonne.milne
2022-04-21, 10:22
Hi Simon,

For http://domain.com:8001/login.rsp, check whether you have a drive:\lianja\cloudserver\tenants\public\wwwroot\l ogin.rso file. If you do, delete it and try the http://domain.com:8001/login.rsp again. If it does not get recreated (or if it did not exist in the first place), fire up a browser session to localhost:8001 on the server itself.

Regards,

Yvonne

SpringBox
2022-04-21, 10:22
Hi Yvonne

Yes the file is created and we have modified it in line with the guide.

Attached is the network page from browser tools

Hope this makes sense as we are totally lost here.

Thanks in advance



Simon

SpringBox
2022-04-21, 10:32
Hi Yvonne

Yes the file drive:\lianja\cloudserver\tenants\public\wwwroot\l ogin.rso gets recreated when deleted.

Tried the Localhost:8001/login.rsp and it yields the same results as trying to get in from external web - please see attached.

Does that help?

Cheers


Simon

SpringBox
2022-04-21, 10:40
If we wanted to just serve this up using RDP instead until we can resolve the web issues, what target and/or command line switches should we use?

We have :

Target

Start in



We want start with the App Center and not the app itself as we are now using the very powerful Lianja users & roles etc.

Thanks


Simon

yvonne.milne
2022-04-21, 10:55
Hi Simon,

Have you deployed the system database with your updates to users and roles?

Are you pressing return after the password or clicking on 'Login'?

Regards,

Yvonne

yvonne.milne
2022-04-21, 11:03
Hi Simon,

Actually, there is a problem with the 'Login' button. Enter the username and password, then just press return.

Regards,

Yvonne

yvonne.milne
2022-04-21, 12:12
Hi Simon,

For IIS, check before adding the redirect (or remove to check);
1. https://yourdomain.com is accessible and displaying the default IIS start page
2. https://yourdomain.com/login.rsp is accessible and displaying the Lianja login page

Regards,

Yvonne

SpringBox
2022-04-21, 12:38
Hi Yvonne

System database deployed.

Aha - yes - pressing Enter (rather than clicking Login button) works.

Ok we are making progress & can now get the app working.

We have 2 export routines which are triggered on record save :

1) exports images from app to jpg files in c:\temp\images - works fine.

2) exports data to vfp free table in c:\temp - does not work. The datestamp on the production vt table in tenants\public\data\database has not been updated so looks like the connection is broken. Will remake the vt from scratch and redeploy & see if that helps.

No - the OLEDB is not registered and, upon inspection, not installed. We have tried the link in the Lianja article

There is an updated version of the VFP OleDB Provider from the one included in Visual FoxPro 9.0 It is available for download from:
http://microsoft.com/downloads/details.aspx?FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en%7C

but that just takes us to the Microsoft page. Searched that site and nothing available.

Do you have the files necessary to install the correct OLEDB for VFP 9 available?

Cheers



Simon

yvonne.milne
2022-04-21, 12:47
Hi Simon,

VFP OLEDB provider (included in the lianja\lib directory)
File drive:\lianja\lib\VFPOLEDBSetup.msi

Regards,

Yvonne

SpringBox
2022-04-21, 16:19
Hi Yvonne

Thank you

That seems to work now.

Have noticed when we add an image to the carousel strip, we get the attached errors showing. Is this anything to be concerned abouit?

Looks like we are really getting there now...

Cheers


Simon

yvonne.milne
2022-04-22, 04:45
Hi Simon,

Does the uploaded image get saved?
Do you see the same error if you add an image in the example_carousel App?

Regards,

Yvonne

SpringBox
2022-04-22, 07:06
Hi Yvonne

Yes - sometimes while other times the main table edit is ruined as well

Tried the example_carousel App and got a slightly different error in web

DevTools failed to load source map: Could not load content for http://localhost:8001/library/LianjaWebFramework/jquery.contextMenu.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Hope that helps.

Nearly there with this one but just need to get the https / SSL going.

Cheers


Simon

barrymavin
2022-04-22, 07:23
Simon, you can ignore any browser errors relating your reading javascript .map files. Thatís normal.

yvonne.milne
2022-04-22, 07:32
Hi Simon,

Do you have any Refresh/Before Refresh/After Refresh delegates in your App?

Also, if you click on the underlined link in the Console tab output, it should take you to the relevant line and provide more info.

Regards,

Yvonne

SpringBox
2022-04-22, 09:55
Hi Yvonne

There are no Refresh/Before Refresh/After Refresh delegates in our App.

We need to be sure about these Windows Server 2019 permissions.

Just to check we have got this right - on Lianja Server we switched from the default Guest account to a group admin account which should give it access to everything. Was that the right thing to do?

Coming in via web (RDP is obviously totally different), logically there is only one Windows logon account as the Lianja users/roles etc are internal to Lianja so permissions should not be an issue but we suspect they are somehow.

What are the recommendations re permissions for web access?

It seems a bit daft to grant Everyone full access to the entire Lianja directory & subfolders.

Cheers


Simon

yvonne.milne
2022-04-22, 10:18
Hi Simon,

Did you click on the underlined link in the Console tab output?

Regards,

Yvonne

SpringBox
2022-04-22, 12:11
Hi Yvonne

Sorry - yes - please see attached


Cheers


Simon

yvonne.milne
2022-04-22, 12:26
Hi Simon,

What is the sequence from the error reported in https://www.lianja.com/community/showthread.php?5970-App-Center-permissions-on-server&p=24509&viewfull=1#post24509 to those screenshots?

Regards,

Yvonne

barrymavin
2022-04-22, 20:57
Hi Simon,

You have enabled your app as a progressive web app.(PWA)
https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Installable_PWAs

PWA work against localhost during development.

If you deploy a PWA to a server you MUST have an ssl certificate installed on the server and you MUST use https otherwise it will not work as expected.

Under normal circumstances after an installation of Lianja cloud server on a server the installer will setup the required permissions. Similarly, if you install the Lianja IIS extension handler in IIS and follow the doc it will “just work”.

My recommendation is you get a basic example app such as the example_CarouselView working first then afterwards deploy your app and data.

SpringBox
2022-04-23, 09:30
Hi Barry

No - the app is not a PWA but there is an SSL certificate installed on the server.

Once we have the app working 100% on http, we will then move to https so we can use it on ipads etc.

My money is still on it being a permissions issue.

Will get out server providers to reset permissions on Monday as we have tried but not been successful.

Thanks for getting back to us

Cheers


Simon

SpringBox
2022-04-25, 10:23
Hi Barry

Rebuilding server overnight with fresh 2019 image as it seems really broken - Will let you know the result when we have done that.

Might we be safer installing Lianja on a different drive than the default drive C or is that asking for trouble?

Interestingly it seems that on development machine (which has always worked fine) using 7.2 beta 26 the table AfterInsert() and AfterUpdate() triggers have stopped working in desktop and web (have not tested the other table triggers)

Cheers


Simon

barrymavin
2022-04-25, 11:41
Simon,

if you have issues with the beta that you have access to please submit a ticket with details not on the forums.

SpringBox
2022-04-26, 05:09
Sorry - will do

SpringBox
2022-04-29, 10:40
Hi Barry

By way of completion, the server was poorly.

It turned out to be some weird Group Policy cascade which was locking all the App servers down super tight. Nobody knows how it happened.

Lianja web app working brilliantly now in non SSL on pc, tablet and phone.

Strangely even though it is http and not https on port 8001, iPad thinks it is fine as there is an SSL certificate on the domain.

Cheers


Simon

barrymavin
2022-04-29, 20:31
Hi Simon,

A page can't qualify as a Progressive Web App (PWA) if it doesn't run on HTTPS; many core PWA technologies, such as service workers, require HTTPS.

HTTPS is a core requirement for running a PWA. Running on port 8001 can only be done using http. To use https you need to install the Lianja IIS extension and an SSL certificate. This proxies https requests to the Lianja cloud server listening on http port 8001.

See details of what you can do with a. PWA here.
https://whatpwacando.today/