我相信我在从 Web API 服务运行 Selenium PhantomJS 驱动程序时遇到权限问题。我曾尝试通过各种管理员帐户模拟该服务,但我仍然遇到同样的错误。如何确定哪个配置文件引发错误?我通过打印 process.StandardOutput.ReadToEnd() 收到此错误
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize
---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access is denied.
---> System.Security.SecurityException: Access is denied.
at System.Security.Principal.WindowsIdentity.SafeImpersonate(SafeTokenHandle userToken, WindowsIdentity wi, StackCrawlMark& stackMark)
at System.Security.Principal.WindowsIdentity.SafeRevertToSelf(StackCrawlMark& stackMark)
at System.Security.Principal.WindowsIdentity.Impersonate(IntPtr userToken)
at System.Configuration.ClientConfigurationHost.Impersonate()