Using IIS ApplicationPoolIdentity to run git inside a PowerShell script, run by a .NET Core web application


I encountered the following error, when trying to execute a PowerShell script from a .NET Core web application:

ErrorStreamEvent: System.Management.Automation.RemoteException: Could not create directory ‘/c/WINDOWS/system32/config/systemprofile/.ssh’.

ErrorStreamEvent: System.Management.Automation.RemoteException: Host key verification failed.

ErrorStreamEvent: System.Management.Automation.RemoteException: fatal: Could not read from remote repository.


To solve this problem, I had to give the application pool identity rights on the “C:\Windows\System32\config\systemprofile” folder.

Make sure in IIS the application pool property: “Load user profile” is set to true.



What to do when “Get column information” does not work in EF 6 edmx

This is probably due to, using temp tables in your stored procedure.

Just use real tables in the stored procedure, then use “Get column information” and then remove the real tables and switch the stored procedure back to using temp tables.



What to do when EF 6 does cannot create a complex type

Sometimes, when your stored procedure ends with a select of constants for example, EF 6 edmx can’t create a complex type.

To solve this, temporarily select columns with the same type from a real table, create the complex type and revert the stored procedure back to returning constants.


Unable to start debugging on the web server. The remote server returned an error: (503) Server Unavailable.

Make sure your IIS application pool is started .





If you are developing a .NET Core web application with Visual Studio and when you start debugging your application on IIS https binding, you might get the chrome error:



I used PowerShell to create a certificate in the local Personal store on the server, then exported this certificate to a file on the server and then imported it back into the Trusted Root CAs via MMC (to avoid browser warnings).

To Create the new certificate for your specific domain:

Open Powershell ISE as admin, run the command:

New-SelfSignedCertificate -DnsName *, localhost -CertStoreLocation cert:\LocalMachine\My



To trust the new certificate:

  • Open mmc.exe => File => Add / Remove Snap-in… => Certificates => Add => Computer account => Next => Local computer: (the computer this console is running on) => Finish => Ok
  • Go to Console Root => Certificates (Local Computer) => Personal => Certificates =>
  • Right click on the created “*” certificate => All Tasks => Export… => follow the export wizard to create a .pfx file:
    • Yes, export the private key
    • Check “Include all certificates in the certification path if possible”
    • Check “Export all extended properties”
    • Check “Enable certificate privacy”
    • Click on “Next”
    • Check “Password”
    • Use a password like “1234”
    • Encryption: “AE256-SHA256”
    • Click on “Next”
    • Choose a file path, like “C:\Temp\mydomain.cert.pfx”
  • Go to Console Root => Certificates => Trusted Root Certification Authorities and import the new .pfx file



How to use the self-signed certificate in IIS


To bind the certificate to your site:

  • Open IIS Manager
  • Select your site and choose Edit Site -> Bindings in the right pane
  • Add new https binding with the correct hostname and the new certificate



I had to clear the SSL state on Windows 10 before the error in Chrome was resolved





Even after installing this self-signed certificate, Firefox will not allow you to visit the site directly, without warning pages.

If you want to remove the warning page just visit the page and then click on “Advanced”


Click on “Accept the Risk and Continue”



Firefox will still show you a warning if you click on the “lock” symbol:



Dealing with slow “Downloading proxy settings” in Chrome


Just turn off “Automatically detect settings” in Windows 10



How to revert git commit but keep changes – aka undo last commit en redo last commit



How to fix: SQL Server – The database principal owns a schema in the database, and cannot be dropped






Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.