IIS 10.0 AppPool crashing (causing 503 error) - asp.net

Situation
After the latest Windows 10 updates (Nov 2017) were installed, the Application Pool required by a local web application keeps stopping/crashing displaying the message below in Event Viewer:
The worker process for application pool 'SrvAppPoolv4.0'
encountered an error 'Cannot read configuration file ' trying to read
configuration data from file '\\?\<EMPTY>', line number '0'. The data
field contains the error code.
Setup
Windows 10
Internet Information Services (Version 10.0.16299.15)
What I've tried
I've tried a few things that I've found via Google, both here on Stackoverflow and other sites, nothing has helped so far. Some of what I've tried:
Changed the AppPool Identity to a different user (Right-click, Advanced Settings).
Checked the permissions on the machine.config (all four of them in the various \Windows\Microsoft.NET\Framework\.. and ..\Framework64\.. folders).
Unchecked the IIS and .NET features (Control Panel / Windows Features) and then added them back in again.
Uninstalled the application in question, cleared everything, then re-installed it.
Nothing has helped.
Besides reinstalling the entire machine, what else can I try?
Also, besides the Event Viewer, are there any other logs I can review to get more details? I read something about an application log, but nothing as to where to find it?
Update:
I just tried what user3739842 suggested Add/Remove Programs, selecting IIS Express and then Repair - issue remains.
Solution
For me the solution was the following (thanks rusware):
Go to the drive your IIS is installed on, eg. C:\inetpub\temp\appPools\
Delete the directory (or virtual directory) with the same name as your app pool.
Recycle/Start your app pool again.
In my case, it was a virtual directory which was corrupted.

Hi the answer to your problem can be found here. It worked for me and same error
Cannot read configuration file ' trying to read configuration data from file '\\?\<EMPTY>', line number '0'.

Related

Windows Process Activation Service Error 2:The system cannot find the file specified

IIS on my development computer stopped working. I just installed the latest update to windows 10 (1803) and now when I try to start the "Windows Process Activation Service" I get an "Windows could not start the Windows Process Activation Service on Local computer. Error 2: The System cannot find the file specified" error. Things I have already tried:
Reinstalled IIS and Windows Process Activation Service, several times
I verified that I do have a "C:\inetpub\temp\appPools" folder
Not sure what to do next.
I have had this problem twice after a windows update. The issue seems to be, that windows adds an incorrect parameter to the WAS service startup parameters. I fixed the issue using the following steps:
Start regedit (just type it into start)
Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS\Parameters
Delete the NanoSetup variable. This variable is preventing WAS from starting
Start the WAS service using task manager or by typing "net start WAS" in Command Prompt
Start the W3SVC service the same way
You can now start your website in IIS again
I had the same problem and nothing in here was the solution for me for a long time. So i rolled back windows also. Today i found the solution working for me - Navigate to:
C:\Users\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys\
find these 3 Key-files...
d6d986f09a1ee04e24c949879fdb506c_*
76944fb33636aeddb9590521c2e8815a_*
6de9cb26d2b98c01ec4e9e8b34824aa2_*
... then in Security-Settings:
first, you have to set your User as OWNER
close Properties Dialog - and open again
Then in ACL set "full controll" for SYSTEM
After that: WPA can be started...
Hope this helps; see also thread here: https://social.technet.microsoft.com/Forums/en-US/315841e1-b8b2-4084-8224-580ef3d13420/upgrade-to-windows-10-1709-iis-fails?forum=win10itprosetup
I had this same problem after installing the Windows 10 1909 update and the nanosetup variable was NOT in the registry. I ended up doing a variation of Sascha's fix.
I took ownership and gave administrators full control of the MachineKeys folder in C:\ProgramData\Microsoft\Crypto\RSA. Then I removed the 3 files in Machinekeys that begin with:
d6d986f09a1ee04e24c949879fdb506c_*
76944fb33636aeddb9590521c2e8815a_*
6de9cb26d2b98c01ec4e9e8b34824aa2_*
The Windows Process Activation Service (WAS) started as expected.
It just has a simple solution, you don't need to reinstall Windows or removing updates, It worked for me so sharing it with all of you,
if you already using IIS and have site's configurations and files in C:\windows\system32\inetsrv\config and C:\inetpub\wwwroot, Back up all files from the folder C:\windows\system32\inetsrv\config and C:\inetpub\wwwroot, if you are installing ISS for the first time then you don't need to have a back up.
On Taskbar right-click on Start button select 'Run', type appwiz.cpl hit Enter.Click on 'Turn Windows features on or off'.
Uncheck 'Internet Information Services' and 'Windows Process Activation Service' click OK button.
After restarting Windows, Delete 'inetpub' folder on C: drive.
Open 'Turn Windows features on or off window' again.
Check 'Internet Information Services' and 'Windows Process Activation Service' click OK button.
After restarting Windows open folder C:\windows\system32\inetsrv\config.
Right click on the file named 'applicationHost' Select Open with Notepad.
In Notepad, Copy all the content of the file.
Select New in File Menu and Paste all the content in the new file.
Save this file in C:\windows\system32\inetsrv\config with the name 'applicationHost.config.tmp', Don't forget choosing 'All Files' in the 'Save as type' box.
Otherwise, file will be saved as applicationHost.config.tmp.txt which will not work.
Type 'Services.msc' in Run, Find 'Windows Process Activation Service' in Services window.
Watch running the service successfully without any errors after clicking on start.
I finally had to give up and rollback the windows build. To do this follow these steps:
Go to settings (Windows+I)
Click on "Update & Security"
On the left click on "Recovery"
Then under "Go back to the previous version of Windows 10" click "Get
started"
It rolled back to "1709" and now works fine.
If you find yourself installing an application on a drive other than C: and that application relies on IIS, the path for inetpub temporary files may be missing. Even if they are present on C:, this may just confuse you into thinking they are present and thus not the issue.
Create the following empty directory structure, replacing G: with the drive letter that your application is installed to, other than C:.
G:\inetpub\temp\apppools
Then, start WAS, from an administrator command prompt:
net start WAS
If this has to do with IIS, restart for good measure, from the same prompt:
IISRESET /restart
This solved my problem when installing a third party application.
I received the same error after update, but on Windows Server 2022 Standard 21h2.
Tried all steps without success.
In my case WU deleted all params in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS\Parameters
so i took it from old ControlSet002:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS\Parameters]
"AccessDeniedMessage"="Error: Access is Denied."
"InstallPath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,\
00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,6e,00,65,00,74,00,\
73,00,72,00,76,00,00,00
"MajorVersion"=dword:0000000a
"MinorVersion"=dword:00000000
"ServiceDll"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,\
00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,6e,00,65,00,74,00,\
73,00,72,00,76,00,5c,00,69,00,69,00,73,00,77,00,33,00,61,00,64,00,6d,00,2e,\
00,64,00,6c,00,6c,00,00,00
"GenerateKeys"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS\Parameters\ListenerAdapters]

Windows 7 - turn on IIS - failing

I have been trying for a day now to enable various IIS services on a laptop.
Using Control Panel, Programs and Features, Turn Windows Features On and Off.
The key feature I am trying to enable is ASP.NET.
I get a stupid error message that gives no clue (An error has occurred. Not all of the features were successfully changed.), but the event log shows a whole string of errors, starting as below.
Unable to install counter strings because the
SYSTEM\CurrentControlSet\Services\ASP.NET_64_2.0.50727\Performance key
could not be opened or accessed. The first DWORD in the Data section
contains the Win32 error code. 020000000E0E0000
Installing the performance counter strings for service
ASP.NET_64_2.0.50727 (ASP.NET_64_2.0.50727) failed. The first DWORD in
the Data section contains the error code. 02000000C9120000
I have searched the net, and tried various remedies, all with no success.
These threads discuss the same topic, without solving it:
http://social.technet.microsoft.com/Forums/windows/en-US/d711ecd1-620c-473c-af39-e607bbe2ec18/turn-windows-features-on-or-off-application-development-features?forum=w7itproinstall
http://blogs.msdn.com/b/tom/archive/2008/04/11/asp-net-performance-counters-missing.aspx
I tried uninstalling all versions of ASP.NET using aspnet_regiis.exe -Ua on each and every version on Framework and Framework64, then adding them back. None of this has made any difference whatsoever.
Any ideas?
I had this problem too. I had 2 errors logged in the Windows Application Event Log:
Unable to install counter strings because the SYSTEM\CurrentControlSet\Services\ASP.NET_64\Performance key could not be opened or accessed
Installing the performance counter strings for service ASP.NET_64 (ASP.NET_64) failed. The first DWORD in the Data section contains the error code.
Note that these msgs are similar, but not the same as the original poster, probably due to different versions and time moving on. I'm on Windows 7 64-bit, with various .NET Frameworks installed, at least 3.5 and 4.x, plus some remnants at least of 2.x. I have Visual Studio 2010 Pro installed, and just installed VS 2013 Community this morning. I already had IIS installed, and I think it was installed before any VS versions. This is the first time I explicitly tried to enable ASP.NET under IIS on this machine.
If you look in the registry, it's true, this key does not exist: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64
I narrowed down the problem to the .NET Extensibility feature, on which the ASP.NET feature depends and automatically checks/enables (not that this helped me).
I followed the other answer in this thread: "Control Panel > Programs > Turn Windows features on or off, and switched off Internet Information Services (which will turn off all the subfeatures), then clicked OK. [Reboot as prompted.] Then I went back to the Control Panel and turned on all the IIS services I needed and the error did not resurface."
HOWEVER, be sure to enable the ASP.NET feature (which auto-checks/enables related dependent features such as the problematic .NET Extensibility feature) at the time you are re-enabling IIS. If you do it at the same time, the registry key is successfully re-added, if not then not. Doing it piecemeal didn't work for me and just resulted in the same error message. A reboot was not required for the enabling (just the disabling), but I have found that changes over time.
Note that there are other problems out there that generate errors when this feature is added to IIS. Apparently if IIS is installed before ASP.NET then the solution is the register ASP.NET with IIS. There are MS pages around that tell you how. (e.g. http://blogs.msdn.com/b/tom/archive/2008/04/11/asp-net-performance-counters-missing.aspx) Use the link to the ASP.NET IIS Registration Tool to fix that problem (although this disable and re-enable of IIS may also work).
I went through these other fixes and they didn't help me. At least one generated an error, but again probably because I had that ASP.NET_64 registry key missing. The standard Windows Fix tool didn't do anything for me either. Updating my .NET Framework to the latest (there happened to be an update to 4.5.2 or something similar) didn't help either.
My guess, in hindsight, is that maybe VS 2010 is too old, and is 32-bit on my 64-bit OS, and it resulted in problems with my registry keys. Maybe. I'm just guessing.
(I would have simply commented on the other answer/solution, but apparently I don't have sufficient points - this would seem to be a flaw in that design.)
I was having the same issue with Windows 7 Enterprise but this worked for me:
Control Panel > Programs > Turn Windows features on or off, and switched off Internet Information Services (which will turn off all the subfeatures), then clicked OK. Then I went back to the Control Panel and turned on all the IIS services I needed and the error did not resurface.

Cannot delete file in network share

The summarized problem is that I cannot delete specific files in a network share. The files seem to be locked on the server side and not by a windows service. The computers where this problem originated was under a domain and the documents and other windows libraries are on a network share. I have tried several solutions that will be described below.
Here is what happened:
While debugging a web application in Visual Studio, I got the infamous blue screen of death. After I restarted and wanted to resume debugging, the project did not compile. I got this error: "Unexpected error creating debug information file z:\MY_Proj_Dir\obj\Debug\My_Proj_Name.pdb Access is denied". Which I found weird, since I have debugged that project in that location many times before. The unexpected windows error while running the debug session in Visual Studio must have locked it somehow. This file is for debugging information and after looking in forums how to resolve the issue, they recommended to delete the Debug directory.
So here are the solutions I have tried:
- First, of course, I tried to clean and rebuild the project.
- Close visual studio and restart the computer and tried again.
- try to manually delete the obj\Debug directory: The files My_Proj_Name.dll and .pdb could not be deleted because apparently I need permission to perform this action from the administrator, which is myself.
- So I right click the directory, open properties -> Security -> Advanced-> ownership -> and the ownership is of my_user_name#the_domain. Which is the account I am logged in from. If I try to change ownership to the only option that gives me there, which is the same (my_user_name#the_domain) , ticking replace owner on subcontainers and objects, it gives me an error “Error applying Security: access denied”. The same if I try to do it on the individual .dll and .pdb files.
I have tried turning User Account Control off, restarting and trying to delete the file.
I have also tried using the command line with no luck.
I tried the tool "unlocker" to see if I can release the file from other windows services or write permissions, but I still cannot delete them.
To see if the problem was on the computer, I tried to log in using VPN from my home computer and accessing the network drive:
- If I delete the files from there, they immediately reappear, without any "cannot delete" dialog. It doesn’t let me change ownership of those files either.
I started up my Ubuntu VM and accessed the network share. and tried to delete the files from there. It gives me an even more weird error message: "File does not exist". But I can see it there!
I tried to log in to the network share from WinSCP and putty, but I cannot access the domain DNS with ssh or ftp. Probably the server only supports SMB (windows share)... I am not sure.
note: I only have problems with that specific folder and its files. I have no problems with any other folders in my network drive. One thing I have learned is not to debug projects located on a network share.
The problem was solved by working offline and debugging locally. Working offline Visual studio was able to rewrite the debug information files. From visual studio I clean the solution and the files were deleted. It seems that released the lock visual studio had on those files. Once it was working offline it was just a matter of turning the work online mode again. Then I was able to compile and debug normally.
I learned not to debug directly on the network share, but instead have my visual studio projects locally to avoid ownership and permission problems.

Parser error in custom asp.net sharepoint page

Can anyone help me with this error?
alt text http://abbeylegal.com/downloads/parsererror.jpg
full image here
It happens usually once a day when trying to load any one of a number of custom asp.net pages in my sharepoint web site. If I recycle my application pool the error disappears (usually for the day).
So far this is what I’ve tried to eliminate the error (which has helped reduce the number of occurrences, but not solved it)
Set the IIS_WPG, Local Service and Network Service account to Full Control permission
on the folder
%windir%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
Added
<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="3DES" decryption="3DES"/>
to the web.config file section.
Recycle the application pool every two hours
My gut feeling is some sort of file locking issue. Have you tried running Process Monitor and having a look at the trace when this error occurs? Be warned that running it may sap some resources on your server.
To use, follow these steps. (You may also find Mark Russinovich's blog useful.)
Set the filter so that it only displays the w3wp.exe process. This will reduce noise. The simplest way is to right-click on 'w3wp.exe' in the list and select Include 'w3wp.exe'.
The monitor should have automatically started so now just wait until you receive the ASP.NET error. Make a note of the time the error occurs! It may also be reported in the SharePoint ULS log.
Stop Process Monitor from capturing events (File, Capture Events) and narrow down to the time of the error.
Look for the word 'FAIL' or 'ERROR' (you can use the program's find feature) and see if you can work out what's happening. You may need to remove the filter as the problem might have occurred with another process besides w3wp.exe.
There may also be interference with an anti-virus program as I've seen these lock files and cause problems on SharePoint before. Can you try disabling it to check if the error disappears? Alternatively, here are details of locations that need to be excluded so that SharePoint can operate correctly with a file-level virus scanner. You may need to add others, I don't believe that list is comprehensive.
I can see why the app pool recycle works, the dll's get recopied to the Temporary ASP.NET files folder.
The question here is, why are they not there anymore? It could be that the files were locked when the app pool recycled overnight, the files were not overwritten with a new version and remain in a locked state. Maybe search crawl was running when the app pool tried to recycle, visiting that page at the time?
P.S. Is your custom page build as part of a "Visual Studio Web Site" or a "Visual Studio Web Site Project"?

Cannot Start IIS on my PC: COM+ System Application: Access is Denied

I'm trying to do some web development. I cannot start IIS (I need to run some Web Services).
As of about a month ago, the "COM+ System Application" service has started failing with this error:
The COM+ System Application service
failed to start due to the following
error: Access is denied.
DCOM also logs an error in the event log:
DCOM got error "Access is denied. "
attempting to start the service
COMSysApp with arguments "" in order
to run the server:
{ECABAFBC-7F19-11D2-978E-0000F8757E2A}
When I start IIS and the WWW service, everthing seems to work until I hit port 80 on my machine at which time the IIS/WWW services both crash unexpectedly:
The World Wide Web Publishing service
terminated unexpectedly. It has done
this 1 time(s).
The following event is placed in the application log as well:
The run-time environment has detected
an inconsistency in its internal
state. This indicates a potential
instability in the process that could
be caused by the custom components
running in the COM+ application, the
components they make use of, or other
factors. Error in
f:\xpsp3\com\com1x\src\comsvcs\package\cpackage.cpp(1184),
hr = 80070005: InitEventCollector
failed
I have searched google until my fingers are numb. I've searched this site to no avail as well.
I have tried:
running the COM+ System Application service as an administrator.
reinstalling SP3 for XP
giving the "SERVICE" account full control to %SYSTEMROOT%\Registration
removing XP Security hotfixes installed about the time it stopped working
I've removed and reinstalled COM+ (it's possible, check google)
Any insight on the COM+ subsystem, it's files and settings or just how it operates would be greatly appreciated.
I need to get this problem resolved so I can get back to work.
Have you seen this link?
http://support.microsoft.com/kb/909444
I'm having the same problem, and it appears it might have fixed it for me - though I did have to reboot afterwards which isn't explicitly in the kb instructions.
(Though it's hard to tell right now if this actually fixed it, because sometimes for me the problem would disappear on its own after a reboot (which doesn't make a lot of sense given the steps in the kb)).
Sorry all.
I forgot to update this when I found the solution... Well, it was self-inflicted. Some months ago, I removed the execute permissions from dllhost.exe. I hadn't been coding asp.net web apps at the time so I didn't notice the problem and couldn't put two and two together very quickly.
I eventually found it by turning on file system failed auditing on my Windows folder hive. I saw a mess of access denied messages related to dllhost.exe and remembered what I'd done.
Thanks for the help.

Resources