Could not find a part of path error on server

前端 未结 2 604
广开言路
广开言路 2021-01-26 22:29

I want to run a scheduler on daily basis. So I have created a Windows application and stored it onto the server.

This works fine on my local machine, but I g

2条回答
  •  暖寄归人
    2021-01-26 23:19

    It looks like access right issue. Unless granted you need administrative privileges to access C:\Windows\System32 folder. On your local machine you might have access to path but on server you do not. Insted of setting C:\Windows\System32 as startupPath in your code, try with Path.GetTempPath.

    https://msdn.microsoft.com/en-us/library/system.io.path.gettemppath(v=vs.110).asp

提交回复
热议问题