问题
Scenario: I have a console application that needs to access a network share with read/write permissions. There is no problems when run it manually.
The problem: When I add this application as a job in my quartz.net server, it cannot access the share. I do not have access to change permissions on the network share, so basically I need my quartz job or if necessary my quartz server to run jobs as me (or as a user that has the proper permissions).
Any ideas in how to accomplish this?
Thanks
回答1:
You can also use impersonation to change the user you're running as on the fly.
回答2:
You need to change the user that the service is ran with (so this actually isn't a Quartz.NET issue). Open service properties in services and change the user from SYSTEM or NETWORK SERVICE to some named user account that has proper rights to the network share.
来源:https://stackoverflow.com/questions/883161/run-a-quartz-net-job-as-user-permissions-issue