How to delete ASP.NET temporary files from shared server

I got a request to look into the question, how do I delete temporary ASP.NET  files on a shared Windows hosting server and I’ve decided to take a look into it.

Unless you have access to the global temp used by the server – which any good sysadmin will not allow – you can’t clear the global temp. However what you can do is change the temporary directory path used by your application.

The web.config file allows you to make application specific configuration changes, including the .NET temp file path. You can instead change the path to a location you do control.

How? Using the compilation Element, but more specifically the tempDirectory attribute. This attribute has existed since .NET 1.1, so it will work on all .NET version from 1.1 through to at least .NET 4.

<compilation tempDirectory=”D:\userdata\client224\temp” />

This is important! Remember to correctly set NTFS and/or share permissions on the new tempDirectory location else your application will not compile. You’ll need to apply read/write (modify) permissions to the folder using the application pool identity. This identity may be a system user like NETWORKSERVICE, IIS AppPool\AppPoolNameHere or another custom identity. For more on application pool identities, check the official documentation.

It’s reasonable for Windows shared hosting providers to want to disable this ability – I would – but I’ve not read any instances of it happening yet.

Best of luck!

VN:F [1.9.22_1171]
Rating: 2.0/5 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 4 votes)
Leave a comment

Windows 10 upgrade error “Setup has failed to initialize the working directory”

Setup has failed to initialize the working directoryScenario

You have attempted to upgrade to Windows 10, perhaps with the media / download tool however none of the upgrades are successful.

You may be experiencing one or more of the following symptoms:

  • “Upgrade this PC now” gives the disappointing “Something happened” error message
  • Creating a USB or ISO image is unsuccessful
  • You may receive a message box saying “Setup has failed to initialize the working directory”
  • Windows Updates for “Upgrade to Windows 10 Pro” has repeatedly failed
  • User anger and frustration at the implication “Something happened” but in reality absolutely nothing happened and you have to start again!

Upgrade to Windows 10 Pro - Failed Windows Updates

Possible Cause

I’ve seen this problem occur when the C:\ drive on the computer being used is low on disk space.

The upgrade process requires approximately 3GB to store upgrade sources, however the actual upgrade and/or creation of an ISO image requires more space. Ensure you have a minimum of 10GB space free on C:\

If you’re unsure where your disk space is tied up, I recommend the free and open source tool WinDirStat to help you visually find used space in unexpected locations.

Did this help? Let me know in the comments.

VN:F [1.9.22_1171]
Rating: 2.8/5 (4 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)

How to start your own certificate authority in seconds!

Do you fall into any of the following groups? You’re a:

  • Webmaster with a few internal websites that you’d like to protect with SSL but don’t want to pay anything?
  • Sysadmin with a few internal servers, you’re sick of certificate warnings and want a quick fix?
  • [Web] developer needing to test application compatibility with HTTPS and sick of self-signed certificate warnings?
  • Security penetration tester wanting to audit a platform in a test environment over HTTPS, but no one wants to pay money because “it’s only test”.
  • Quality assurance tester needing to test an application with HTTPS but your script breaks because of self-signed certificate warnings?

The best solution is to implement your own PKI or “public key infrastructure” which good ol’ Wikipedia tells us is a “set of hardware, software, people, policies, and procedures needed to create, manage, distribute, use, store, and revoke digital certificates.” The problem with that is it’s outrageously over the top.


Take a deep breath, count to 10… then go to this website (

Trusted connectionIn literally seconds you can implement your own certificate authority (CA). For the novices; the certificate authority (CA) is much like that best friend you have who knows everyone. If they trust someone, it’s very reasonable you can trust them too. It allows websites to say “I’m trusted by” your friend, so it’s safe for you to trust me – this is when the little green lock appears. With your own CA, you decide what is trusted and who new certificates are created for.

Life members out there will respond with “you’ve always been able to do that with OpenSSL on the command line” – and they would be correct.

But here’s 11 advantages to use TinyCert over traditional options:

  1. It literally takes seconds to implement (minutes if you’re a slow typer)
  2. No technical background is required to create the CA and start issuing your own certificates
  3. You don’t need to write a script or use the command line
  4. is nice and easy to remember
  5. Share the logins among colleagues for self-service certificate creation
  6. You’ll get automatic renewal emails
  7. It’s not associated with Active Directory or any of the complexity surrounding it
  8. It’s perfect for non-production platform testing
  9. No domain name, company or staff verification, no paper-work, no IT department necessary
  10. Issue certificates by a name you choose (Acme Pty. Ltd.) and for common names you need (
  11. The elegance is in the simplicity.

What’s the Catch?

No catch. And it’s 100% free.

Obviously you need to do a small amount of work to add your newly created CA into the “trusted certificate authority store” on computers you’re testing on.

Detailed help on the TinyCert website describes how to add your new certificates to Apache, nginx and IIS web servers; as well as adding your CA into your computer’s certificate store. If you need anymore help for your operating system or browser, Google is your friend as always.

Why are you mentioning this?

Because all users of technology have wrongly become accustomed with sending sensitive information across networks in plain text for too long and for no good reason. The public internet has long been a dangerous place, but one we still send our kids out to play in.

Any project that assists in improving application compatibility with secure protocols like HTTPS, aides making applications over SSL the norm, makes security easier to utilise and access – deserves a massive thumbs up from me!

Credit where credit is due

If you’re as pleased with their amazingly simple service as I am, buy them a cup of coffee as I did to show how much their hard work is appreciated. Maybe even two coffees… just a suggestion…. (Go on, you’d lose the $4.80 to the lounge cushion gods anyway, waste not want not).

VN:F [1.9.22_1171]
Rating: 1.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
1 Comment