I have a window service that needs to access a shared folder to check a file. Currently I use:
if (System.IO.File.Exists(excelFile))
where excelFile is: \\isgisdb01\GIS_projects\Garage_sales\GarageSales.xls
That results in an error: file not found
So I added a service account to the Garage_sales folder. How do I assign the service account credentials to my code so it would get the permission it needs?