Colleagues,
I've made a small program that checks the files' sizes in a "target" directory (too large image files, like clients' logos, may cause problem with printing docs).
This Program works perfectly on my WS: sends E-Mail alerts and writes the findings into LOG file w/o any problem.
However, when I posted this program (EXE and INI files) on a server - Program works, that is sends alerts, but does not create this LOG file.
I checked the User Access permissions - Read/Write/Execute, so it's not like a User has just Read/Execute privileges, and still...
I even ran this EXE As Administrator - same thing: no LOG file was created/updated.
Here's the code:
There are other places where this statement on the bottom of the code is used.
So, the Question is: What prevents the Program's writing onto server's HDD, even if the User has all but Admin privileges?
OR: what am I doing wrong?
Please advise!
Regards,
Ilya
I've made a small program that checks the files' sizes in a "target" directory (too large image files, like clients' logos, may cause problem with printing docs).
This Program works perfectly on my WS: sends E-Mail alerts and writes the findings into LOG file w/o any problem.
However, when I posted this program (EXE and INI files) on a server - Program works, that is sends alerts, but does not create this LOG file.
I checked the User Access permissions - Read/Write/Execute, so it's not like a User has just Read/Execute privileges, and still...
I even ran this EXE As Administrator - same thing: no LOG file was created/updated.
Here's the code:
Code:
Public gsStartDir As String = (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)).Replace("\bin\Debug", "\")
Public gsLog As String = "", gsLogFile As String = gsStartDir & "Image_File_Size_Control.LOG"
'...
gsLog = Replicate("=", 134) & vbCrLf & "Server/WS Name: " & Environment.MachineName & vbCrLf & vbCrLf & "Start DateTime: " & Format(Now, "yyyy-MM-dd HH:mm:ss") & vbCrLf & _
[indent][indent]Replicate("=", 134) & vbCrLf[/indent][/indent]
[b]My.Computer.FileSystem.WriteAllText(gsLogFile, gsLog, True)[/b]
There are other places where this statement on the bottom of the code is used.
So, the Question is: What prevents the Program's writing onto server's HDD, even if the User has all but Admin privileges?
OR: what am I doing wrong?
Please advise!
Regards,
Ilya