FoxInCloud
Command not working in COM mode and workin in file mode
Gravatar is a globally recognized avatar based on your email address. Command not working in COM mode and workin in file mode
  Michele
  All
  Jan 14, 2021 @ 07:10am

I have this code

	Local cRemoteFileIni
    *!* i recover the customer CODE to identify the correct configuration file
    *!* from a INI file
	cRemoteFileIni = GetStringFromIni("Defaults","CustomerId","", wSetFile) + "_MOBILE.INI"
	oHttp = CreateObject("wwHttp")
    *!* Here i get the file content
	cSetFile = oHttp.httpGet("http://frontend.acut.it/acutmobile/getinifile.mob?" + cRemoteFileIni)
	If Empty(oHttp.cERRORMSG)
            *!* If in file content i find the [OK] string i save it as the new
            *!* configuration file
		If At("[OK]", cSetFile) != 0
			StrToFile(cSetFile,wSetFile)
		Endif
	Endif

This code is corretly executed whe i run my app in file mode and when i execute the same app in COM mode i have not the same result and the new configuration file is not saved. The problem is at cSetFile = oHttp.httpGet("http://frontend.acut.it/acutmobile/getinifile.mob?" + cRemoteFileIni) where in COM mode i receive an empty string

Some suggests ? Thanks

Gravatar is a globally recognized avatar based on your email address. re: Command not working in COM mode and workin in file mode
  Vincent H.
  Michele
  Jan 14, 2021 @ 10:34am

Hi Michele,

Have you previously copied your file to the site's temporary folder ?

Gravatar is a globally recognized avatar based on your email address. re: Command not working in COM mode and workin in file mode
  Michele
  Vincent H.
  Jan 14, 2021 @ 01:29pm

As you can see in my code, I get the file as a string and save it with strtofile to the destination folder... As I said this code doesn't work only in com mode

Gravatar is a globally recognized avatar based on your email address. re: Command not working in COM mode and workin in file mode
  FoxInCloud Support - Thierry N.
  Michele
  Jan 15, 2021 @ 12:27am

Most probably, the user running the COM server does not have enough credentials on the target folder.

Gravatar is a globally recognized avatar based on your email address. re: Command not working in COM mode and workin in file mode
  Michele
  FoxInCloud Support - Thierry N.
  Jan 15, 2021 @ 01:05am

I enter on the server using RDP with the same user, configured in COM server, and in file mode it works.... But the problem is not when i save the string as file with strToFile(), the problem is when i get the page with http.get because here i receive an empty string in com mode while in file mode i receive the file content

Gravatar is a globally recognized avatar based on your email address. re: Command not working in COM mode and workin in file mode
  FoxInCloud Support - Thierry N.
  Michele
  Jan 15, 2021 @ 01:26am

Then you need to debug the transaction getIniFile() on your server

Gravatar is a globally recognized avatar based on your email address. re: Command not working in COM mode and workin in file mode
  Michele
  FoxInCloud Support - Thierry N.
  Jan 15, 2021 @ 03:48am

The problem is not in getinifiles() function. It works fine

The problem is at cSetFile = oHttp.httpGet("http://frontend.acut.it/acutmobile/getinifile.mob?" + cRemoteFileIni)

where cRemoteFileIni is correct, but the httpget retunrns and empty string instead the file content.

Gravatar is a globally recognized avatar based on your email address. re: Command not working in COM mode and workin in file mode
  FoxInCloud Support - Thierry N.
  Michele
  Jan 15, 2021 @ 05:19am

HTTPget() returns the response from getIniFile.mob, so this is where you need a debug

© 1996-2024