进程身份设置为用户的 IIS 7.5 有错误的 USERPROFILE
首先,这是我关于类似主题的第三个问题..我仍然没有答案,也许只是接近它(参见第一个,第二个)。
我的 Web 应用程序(IIS 7.5 下的 ASP.NET MVC3)运行 git 来访问一些 github 存储库。当我将我的工作站升级到 Windows SP1 后,它就停止工作了。原因是git一启动,实际上就运行了ssh.exe来与github进行通信。 ssh.exe 似乎挂起,因此所有应用程序都挂起。
该应用程序使用的应用程序池使用与我自己相同的进程标识。但是使用 ProcessHacker 我可以看到以下图片:
因为 USERPROFILE 指向 /system32/config/systemprofile ssh。 exe 期望有 .ssh 文件夹,其中包含公钥/私钥。由于钥匙不在那里,所以它挂起。
但密钥通常位于 ~/.ssh 中(在我的例子中为 c:\users\alexander.beletsky.ssh)。一旦我将密钥复制到 /system32/config/systemprofile,应用程序就开始按预期工作。
我的问题是,为什么 w3wp.exe 认为它的配置文件位于 /system32/config/systemprofile 中?有可能改变这一点吗?这是应用程序池的预期行为还是只是我的机器的问题?
等待任何线索!
编辑
应用程序池的“加载用户配置文件”属性设置为 TRUE。
First of all, this is my third question on the similar topic.. and still I have no answer, maybe only approaching it (see first, second).
My web application (ASP.NET MVC3 under IIS 7.5) runs git to access some github repositories. After I upgraded my workstation to Windows SP1 it stopped to work. The reason was that as soon as git started, it actually runs ssh.exe to communicate with github. The ssh.exe appears to hangs up, so all application hangs.
The application pool used by that application use the same process identity as myself. But using ProcessHacker I can see following picture:
Because of USERPROFILE is pointed to /system32/config/systemprofile ssh.exe is expecting to have .ssh folder, that contains public/private keys. Since keys are not there it hangs.
But keys are typically in ~/.ssh (in my case c:\users\alexander.beletsky.ssh). As soon as I copied keys into /system32/config/systemprofile application started to work as expected.
My question is, why does w3wp.exe thinks that its profile in /system32/config/systemprofile? is it possible to change that? it is expected behaviour for application pool or just issue of my machine?
Waiting for any clues!
EDIT
Load User Profile property of Application Pool is set to TRUE.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ssh.exe
实际上是使用 HOME 环境变量。检查是否设置正确。ssh.exe
is actually using HOME environment variable. Check if it set correctly.由于我的机器在进程黑客的环境页面中具有相同的值,并且仍然
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
具有我的用户 appData 的值,并且我有 SP1,所以我认为它不应该与它相关,而应该与您的配置中可能已更改的某些内容相关。检查您的 inetmgr 是否已为您的应用程序正确设置身份。打开 C:\inetpub\temp\appPools\yourAppPoolName\yourAppPoolName.config 并检查此设置是否存在:如果不存在,您可以在那里配置它(以纯文本形式输入密码,或者您可以使用 inetmgr 配置它,就像我在回答中所述)你的另一个问题)。
As my machine on which this works has the same value in enviroment page of process hacker, and still
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
has value of my user appData, and I have SP1, I think that it should not be related to it, but to something in your configuration that could have been changed. Check if your inetmgr has properly set identity for your application. Open C:\inetpub\temp\appPools\yourAppPoolName\yourAppPoolName.config and check if this setting exists:If not, you can configure it there (put password in plain text or you can configure it using inetmgr like I described in my answer to your other question).