1

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:

w3wp process environment

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.

Community
  • 1
  • 1
Alexander Beletsky
  • 19,453
  • 9
  • 63
  • 86
  • How do you know that this IS process of app pool where your app is running? Can you stop all other app pools except that to verify? On my machine, where I verified that solution for your past question wokrs, only **bold** field in app pool advanced settings are .net version (v4.0), identity (obrad), and Specific Times (TimeSpan[] Array). – Goran Obradovic Oct 05 '11 at 19:47
  • At my machine, that process in processhacker has same profile folder. – Goran Obradovic Oct 05 '11 at 19:53

2 Answers2

2

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

Mike Chaliy
  • 25,801
  • 18
  • 67
  • 105
  • exactly! as soon as I put patch like that, it started to work: https://github.com/alexanderbeletsky/bounce/commit/36b922f3744857e5998356f6d8a985ec2b099d8c – Alexander Beletsky Oct 06 '11 at 08:55
  • You probably need to check if HOME variable exists before overriding it. – Mike Chaliy Oct 06 '11 at 09:06
  • So, you should probably edit your question to note that problem was not caused by IIS, but by installation of SP1 to windows AFTER git was already installed. I installed git after SP1, that is why my HOME was not reset and everything works. – Goran Obradovic Oct 06 '11 at 09:43
1

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

Goran Obradovic
  • 8,951
  • 9
  • 50
  • 79