开发者

IIS 7.5 with process idenity set to user has wrong USERPROFILE

开发者 https://www.devze.com 2023-04-11 14:13 出处:网络
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).

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 wit开发者_C百科h 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:

IIS 7.5 with process idenity set to user has wrong USERPROFILE

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.


ssh.exe is actually using HOME environment variable. Check if it set correctly.


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:

<configuration>
    ....
  <system.applicationHost>
    <sites>
      <site name="Default Web Site" id="1" serverAutoStart="true">
       <application path="/yourAppPath" applicationPool="yourAppPoolName">
                <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\yourAppPath" userName="yourUserName" password="[enc:AesProvider:someHashHere=:enc]" />
       </application>
       ...
      </site>
    </sites>
  <system.applicationHost>

<configuration>

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号