I have a program that will ran from a mapped drive (at least with most of our clients). The drive is typically on the local machine. For example S:\ will be mapped to C:\myDir. My application create's a file that contains a timestamp of when an event occured.
If I place my executable in C:\myDir everything runs as expected. Here's the interesting part. If I open a Windows explorer and navigate to the S:\ drive (which is C:\myDir), I get a permissions error when I try to write to my file. I've verified that the permissions on my mapped drive is set to full control.
Here's the code. Is there something about using streamwriter across networks?
vb Code:
Private Sub SetTime() Try dTime = Date.Now Using sw As StreamWriter = New StreamWriter(My.Settings.InProgessFile) sw.WriteLine(dTime) End Using Catch ex As Exception MessageBox.Show("SetTime: " & ex.Message.ToString) End Try End Sub




Reply With Quote