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
Hi Michele,
Have you previously copied your file to the site's temporary folder ?
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
Most probably, the user running the COM server does not have enough credentials on the target folder.
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
Then you need to debug the transaction getIniFile()
on your server
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.