I am trying to write a log string from a C# program to a network share folders, unfortunately when I try to do this they give me a unauthorizedaccessexception. My code looks like below
FileStream newfile = new FileStream(@"\\shareserver\Attachments\test.txt", FileMode.CreateNew, FileAccess.ReadWrite);
TextWriter tw = new StreamWriter(newfile);
now if I just put \\shareserver\Attachments in the browser, the directory pops up. I have full administration server rights to this folder and server. So why the exception? Can someone help please!