如何启动与特定的用户名和放一个IIS进程;密码 [英] How to start a IIS process with specific username & password
问题描述
我试图运行从我们的内部网站的应用程序。当我使用的Process.Start(记事本);
我可以看到记事本进程,我们在应用程序池设置默认提到身份的Web服务器启动。
I'm trying to run an application from our internal website. When I use Process.Start("notepad");
I can see that notepad process started in our web server with default identity mentioned in the app pool setting.
不过,我要开始与特定的用户名和放大器的过程;密码。所以,我试图运行此行code的
But I have to start the process with specific user name & password. So I have tried to run this line of code
string password = "XXXXX";
System.Security.SecureString securePwd = new System.Security.SecureString();
foreach (char c in password)
{
// Append the character to the password.
securePwd.AppendChar(c);
}
Process.Start("notepad", "username", securePwd, "domain");
在这种情况下,我甚至不看任何的记事本程序在web服务器启动。 code的线路执行,因为当我通过密码错误,我可以看到我的网页抛出坏用户名或密码的错误。
In this case I don't even see any notepad process started in the web server. The lines of code executing because when I pass wrong password I can see my webpage throwing error of "bad username or password".
推荐答案
谢谢大家对您的回复。在这里,我得到了解决,现在我的进程模拟用户启动。
Thanks everyone for your reply. Here I got the solution and now my process start with impersonated user.
http://support.microsoft.com/default。 ?ASPX SCID = KB; EN-US; 889251
感谢。
这篇关于如何启动与特定的用户名和放一个IIS进程;密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!