I have a console application that i would like to run as ‘MySpecificUser’. Can i specify this user in app.config?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you can’t. By the time the config file is read by the CLR it is too late to specify the user the process runs under. On the other hand you could write a launcher console application in whose config file you specify a username and password which are used to run the actual application using for example this
Process.Startoverload.