.net windows service local application data is different then in normal app

前端 未结 1 1159
一整个雨季
一整个雨季 2020-12-19 00:29

In normal console app I have this

Environment.SpecialFolder.LocalApplicationData is C:\\Users\\Simon\\AppData\\Local\\

In Windows service

<
相关标签:
1条回答
  • 2020-12-19 01:00

    Remember that the services run under a different user profile (can be a LOCAL_SERVICE, NETWORK_SERVICE, etc.) If you'd like them to be the same, run the service under your user profile (You can specify this ServiceProcessInstaller.Account property when you create the installer, or in the Services manager of windows).

    0 讨论(0)
提交回复
热议问题