I need to write to a file in order to log values received through a web service in ASP.NET/VB.Net. This file must be on the web server . What code can I write for this in the web service ?
Attached is what I have written but I'm not sure if it is good for a web server or only when working with localhost.
strWriteLog = "LogDateTime:" & Date.Now.ToString & " Key:" & sKey & " UpdateDate:" & Rec.UpdateDate
My.Computer.FileSystem.WriteAllText("C:\inetpub\wwwroot\site\myDir\Files\traceDates.txt", strWriteLog, True)