|Webdev 26 : use of uploadcopyfile|
|Débuté par Dirk HEYVAERT ( SBO, 18 juin 2021 10:06 - 2 réponses|
Posté le 18 juin 2021 - 10:06
Code works in testmode on development pc but not on application server , win 2012 R2 with IIS 8
I was using webdev 22 on win2008 R2 and IIS 7, all this worked fine.
Now I get the following errors
Any ideas , I guess it is a setup of IIS or a problem in the application server?
code of "receiving the file uploaded":
naam,naamt is string
school is string
nummerg is int
nummer,exten is string
school = scholen.naam
school = Replace(school,". ","")
naam = MySelf.FileName(False)
exten = ExtractString(naam, 2, ".")
naamt = ExtractString(naam, 1, ".")
nummerg = leerlingqry.llnummer
nummer = nummerg
// Copy the file into the directory of data
naam = school+nummer+TimeToString(TimeSys(), "MMSS") + naamt + "." + exten
UploadCopyFile(MySelf, "c:\docu" , naam )
Edit2..Value = naamt + "." + exten
Edit25..Value = naam
nconnection is int
nconnection = FTPConnect("192.168.1.77" , "admin" , "SBOsbo123" ,"21", True,20)
ressend is int
ressend = FTPSend(nconnection, "c:\docu" + ["\"] + naam ,"/docu")
Posté le 18 juin 2021 - 15:55
if I understand correctly, this code doesn't work on a new server...
Now, I see that you are working in "c:\docu"
Did you setup the server so that the internet user running your site (iUser or equivalent, depends on the pc) has the rights to read/write in "c:\docu" ? By default, ANYTHING outside the site directory is forbidden
Posté le 18 juin 2021 - 17:33
thanks for the reply, I thought of given the rights , but I will try to use a dir inside the site.
I tried this and now it works fine. thanks a lot