Currently have an issue where most of the time shutting down the PC just performs a restart, annoying to say the least, been going on since late 2018.
I’m currently trying out this solution to see if it can be resolved.
6-Dec-19: A couple of test shutdowns later and it seems to be working, one to monitor.
If you encounter the following error then this may be the fix you’re looking for.
Server Error in ‘/’ Application.
The current identity (IIS APPPOOL\xxxxx) does not have write access to ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files’.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The current identity (IIS APPPOOL\xxxxx) does not have write access to ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files’.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): The current identity (IIS APPPOOL\xxxxx) does not have write access to ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files’.]
System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection) +10003412
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +204
[HttpException (0x80004005): The current identity (IIS APPPOOL\xxxxx) does not have write access to ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files’.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9947380
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +456
Version Information:Â Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0
Simply run this code, from the Developer Command prompt: aspnet_regiis -i
Update 3-Jul-17:
On Windows Server 2012 you may need to run this command:
Why? I have some unit tests that need to run off of some pre-defined static XML data and while the tests run fine so long as the file and assembly are in the same location as soon as the assembly is moved elsewhere they start to fail, “file not found” exceptions.
So if the file is embedded in the assembly I don’t need to worry about where it is located anymore.
The assumption, in the following, is that the file is XML that has been serialised from an existing List and is being reloaded back into the same, and that the file is in the current assembly. “_states” is a global variable.
So here are the basic steps for this:
In your Solution Explorer view right-click on the file, in this case “state.xml”, and view it’s Properties, make sure that the “Build Action” is set to “Embedded Resource”, optionally set the “Copy to Output Directory” to “Do not copy”.
Once this has done then the file can be loaded and copied into the required object using:
An important thing to remember is that the “Namespace” prefix to the file is the “Default namespace” as entered in the Application properties tab and not the namespace used in the referencing file.
You can reference the file, if it’s in a sub-folder by adding the folder just after the namespace, e.g.
In my case this stopped notepad.exe from saving files smoothly, okay how many people use notepad still? The files did save but you had to click through a couple of Window’s dialogs saying that the file was running on the wrong version of Windows. Quite why the 64 bit of notepad was running this is beyond the level of investigation I put into this.
I tried to uninstall it using regsv32 but that also complained it was the wrong version. Right clicking on the file and examining the properties was of no help at all, so maybe it is corrupt? Looking at the ATL110.dll we see that that it has been signed by Microsoft, my version of ATL100.dll didn’t even offer up the tab! Should have taken a screen grab before I replaced it.
Digital signatures of the atl110.dll
Trying to find similar issues, either via Google or Bing, offered up plenty of sites who would provide a copy – but without having any checksum to work with no way was I downloading them! Also no one seemed to provide any solution, maybe I can’t construct the correct query or I should have gone further into the results.
Next was to try and rollback the file, not an option as by the time I’d found the issue I’d helpfully cleared out, read reset, my system restore and windows backups so they were no use. Running the System File Checker (sfc.exe) showed that there were no problems with the Windows installation.
Okay so back to basics and try and figure it out, with vague recollection of my VC++ days (very vague and no fun) we find the DLL is part of the Active Template Library (the ATL in the file name) part of the C++ 2010 Redistributable package (the 100 in the file name).
First off I ran each installer in repair mode, no luck the error still persisted. The atl100.dll still wasn’t right. So I took the sledgehammer to it and deleted it. Then I ran each installer twice, first removing the package and then to re-install. I didn’t reboot in between removing and installing but it is probably advisable. Certainly once you have re-installed then a reboot would be good practice.
By design/default the indexing service isn’t enabled on Windows 2008, which is only a real issue if you use a server as a development platform. So to turn it on read the Microsoft support article KB954822. The service is now considered to a part of the Server Manager role.
This works on Windows 7, Windows Server 2012, but I’ve not tried on other platforms.
First off fire up a cmd prompt, with administrative privileges.
Then into this type the following: net user account_name *
This will prompt you for your new password, which will not be displayed, and then to verify it afterwards as well.
Press Windows key and R, a command box should appear.
Into this box, the “Open:” field, type control userpasswords2 and hit the enter key.
This should display the “User Accounts” screen, in Windows 7. From here select the user name, in the main table, and uncheck the “Users must enter a user name and password to use this computer.”
A click on the Apply button will open the “Automatically Log On” window. Enter the password, and confirm it, to add the password to the system so that it does not need to be entered during startup.