Url rewrite 2.1 stops Application pool in IIS 8.5 (return 503 status), windows server 2012R2 - url-rewrite-module

I install the URL Rewrite from the Web Platform Installer.
No added rule.
Then, when I access website url, it returned 503 code and Application Pool was stopped.
It works normally when I uninstall the URL rewrite module from Control Panel.
I have tried many searches on google but no results.
I found that in Event log:
- The Module DLL C:\Windows\system32\inetsrv\rewrite.dll failed to load. The data is the error. Application pool 'DefaultAppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool.
(rewrite.dll is exits)
Any ideas?

In event log I found the same message. I.e. The Module DLL C:\Windows\system32\inetsrv\rewrite.dll failed to load. The data is the error.
For me the solution that worked was to replace the "rewrite.dll". In 2 of our other server it was working fine and they were installed in 2017. So I just copied the "rewrite.dll" from that server and replace it on my new server.
For me the older version(v7.1.1952.0) of the dll works, but new version ( v7.1.1993.2351), which comes with the latest setup, doesn't work.
BTW you need to stop the IIS before you replace the dll and start again.

I had the same experience and nothing I did fixed the issue e.g. repair, reinstall, restart, etc.
Then I removed what the Web Platform Installer installed and manually installed the x64 version of URL Rewrite and everything now works nicely.
Make sure what you’re installing matches the OS.

Related

.Net core 3.1 sudenly stoped thowing HTTP Error 500.31 - ANCM Failed to Find Native Dependencies

Everything was fine until yesterday. This must be due to Windows update. No one touched the server. I have tired couple of similar solutions posted in Stack Overflow(all are old questions),none of them worked for me. What I have, Server Windows server 2019, APP netcore 3.1 ,IIS version 10. .net core runtime and SDK both are installed. This was working before. No one touched anything, just stopped working
In the browser appearing
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
When I executed on the command line
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in
When I checked event log. Something like below appeared. But let me tell you in the build
directory we don't have a file like app.runtimeconfig.json
What I have tried
Repair .netcoe runtime and SDK
Restore old DB backup
Reinstall .netcore versions
No pending Windows updates
Restart IIS APP pool also the server
Check file permission
None of them worked for me. If anyone can help, really appreciate.
For this issue, we can't find out that the environment of windows server caused by windows update is abnormal. As you said, it worked fine before.
So please allow me summarize below suggestions as answer.
Suggestions
Copy the publish file named original_file . And paste it in our dev pc or other server which have IIS Management. And test it, this publish file should be works. This step just confirm the publish file is normal.
Create a new website and a new application pool. Create a new asp.net core3.1 application and deploy it. Then check if it works properly under this new site.
The site should be fine in the second steps, and replace it with the original_file. And the application also should be works fine.
The site can't work in the second steps, it means the environment in you server has some problem. It could be registry issue or ApplicationHost.config issue in IIS and so on. If it's very important for you, you can rasie a support ticket and let official engineer help you to figure out what happend in this windows Update
After the third step, if the new site can run the original_file file well. We can compare ApplicationHost.config between the new site and the original one to see if any settings have been changed.

IIS Web Platform Installer Error: 'doctype' is an unexpected token. The expected token is 'DOCTYPE'. Line 1, position 3

I've just created a new IIS website on a Windows Server 2008 in order to use it to deploy a new website.
The website is still empty.
If I try to open IIS Web Platform Installer under Management Tools, I get stuck on the error:
'doctype' is an unexpected token. The expected token is 'DOCTYPE'.
Line 1, position 3.
After closing the error, the Web platform Installer closes.
Do anyone know how to solve it?
Let me know in the comments if you need any other info or technical data, I have really no idea on how can I troubleshoot this
I had the same issue. However, I cannot uninstall IIS completely as I have many sites on my IIS running.
What I did was, I tried to install an IIS module which was not there. for eg, I chose CORS module.
You can get it from here https://www.iis.net/downloads/microsoft/iis-cors-module
Once I tried installing, WPI automatically uninstalled and reinstalled during the process and it resolved the issue.
Hope it helps!
As mentioned by #qbik Simply updating the Web platform installer fixed the issue. You can download the latest at this time from here.
Done, here's how I solved.
This issue seems to be strictly related to an old configuration of this server, so I had to manually reset it. If you face this issue, these following steps should work fine:
First of all, I had to remove the IIS role functionality from
Control Panel > Programs and Features > Turn Window Features on or
off > Roles.
Then, I restarted the server and added again the IIS role
functionality (make sure to check all of the asp net
functionalities).
After that, I restarted the server (again) and I have reinstalled: 1) DotNetCore.2.0.7-WindowsHosting (you've got to find the installer online, make sure to download the last version. 2.0.7 was the last when I made this question so on 25/05/2018) 2) Web platform Installer from here.
Executing web platform installer from all program inside start menu worked fine.
Hope it will be helpful
(See Also:
How to Install Web Platform Installer and Web Deployment)

IIS does not start .net core 1.0 executable

so after .net core 1.0 got published I started a new console project and imported the code from a small prototype that is supposed to run without IIS. Besides having to use net46 in my project.json due the not-yet updated MongoDB.Driver, that worked fine. When I build the app in Visual Studio a small App.exe with a lot of dll is build and can be run fine locally without IIS.
I then noticed the option to build for IIS Express and thought that I can use the IIS on our server (IIS 6.2, Windows Server 2012 R2) too. It publishes fine with WebDeploy, but nothing happens after that. I was following this official guide. I installed the .NET core Windows Server Hosting bundle and everything appears to be in order, but when I browse to the url, I get a ERR_NAME_NOT_RESOLVED. Theapp.exedoes not appear in the Task Manager and I can't find any log file, although it is enabled in theweb.config. I can execute the app manually, but then it only listens on the defaultlocalhost:5000` address.
If I understood it correctly, the IIS is supposed to act as a reverse-proxy to the dotnet tool which starts a dll, but in my case it's already a compiled exe that works standalone. But I can't figure out how to build a dll from this app..
What am I doing wrong?
If you target full .NET Framework the application will be .exe and not .dll and it is fine. ERR_NAME_NOT_RESOLVED indicates that the url you provided in your browser could not be resolved and the request to the application was not made. AspNet Core Module starts the application on the first request and because the host could not be resolved the request was not made and the application was not started. Once you figure out why the name could not be resolved and you still have issues with making your application work with IIS take a look at my post which explains how things work and how to troubleshoot issues. This, however, only applies after the request can reach your application.

Cannot start Windows process activation service on Windows 10

After upgrading from Windows 7 Pro x64 to Windows 10 Pro x64, I cannot start IIS. Most of the Windows 10 system works fine. Some study tells me that the primary problem is that the Windows Process Activation Service (WAS) will not start.
I have another machine that upgraded to Windows 10 with IIS fine (Windows 7 Home Premium x64 up to Windows 10 Home Premium x64).
The IIS on that machine works OK (it only serves one website; so simpler setup.)
I have had NO LUCK finding anything on the Internet that resolves this.
I tried using the clean.iinstall IIS config files (no improvement).
I tried uninstalling IIS - uninstall failed and rolled back (see below).
I tried uninstalling WAS - uninstall failed, and rolled back.
DETAILS:
My first error trying to run IIS Manager program:
One or more problems have been detected during IIS upgrade. As a precaution,
one or more IIS services have been disabled. Please review the following error message:
Data loss has occurred - You upgraded your operating system or switched from one Windows SKU
to another SKU, and data from the previous installation of IIS has been lost or copied incorrectly.
As a result, the services W3SVC and MSFTPSVC have been disabled. Before enabling these services,
you should review the latest IIS 7.0 compatibility information.
(The link to see the IIS 7.0 compatibility information was a dead link.)
I decided to give it a try despite the compatibility warning. I started the services IIS, MSFTP, WAS and W3SVC (depends on WAS), then tried to start IIS Manager.
Failed to connect
There was an error when trying to connect. Do you want to retype your credentials and try again?
Details:
Creating an instance of the COM component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344}
from the IClassFactry failed due to the following error: 800700b7
Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7).
FACTS:
The IIS configuration files exist with non-zero length; they look coherent.
C:\Windows\System32\Inetsrv\Config
ApplicationHost.config
Administration.config
Redirection.config
I have a backup that I made that should be good (not just the automatic backups).
machine.config exists ok: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
The appPools folder exists: C:\inetpub\temp\appPools
The upgrade changed IIS from v7.5 to v10.0.10240.16384
This machine has one user account (me) and the account is marked Administrator.
My previous Windows 7 Pro with IIS 7.5 worked FINE for several years. IIS was giving no trouble before the upgrade.
I can use other network stuff OK: Internet, Outlook, PuTTY, MySQL Workbench (remote & local), and FileZilla.
Trying to start the Microsoft FTP service, or run appcmd or start W3SVC or WAS all give the same error:
Error 183: Cannot create a file when that file already exists.
appcmd list backup --> failed (running as Admin)
ERROR ( hresult:800700b7, message:Command execution failed.
Cannot create a file when that file already exists.)
Event Log after error starting WAS:
The configuration manager for Windows Process Activation Service (WAS) did not initialize.
The data field contains the error number.
error # = B7000780
I used the MS error lookup tool:
To see the appcmd error ( 800700b7)
for hex 0x800700b7 / decimal -2147024713 :
STIERR_HANDLEEXISTS stierr.h
1 matches found for "800700b7"
To see the WAS error (B7000780)
as an HRESULT: Severity: FAILURE (1), Facility: 0x1700, Code 0x780
for hex 0x780 / decimal 1920 :
SQL_1920_severity_10 sql_err
Skipping rebuild of index ID %d, which is on a read-only
filegroup.
ERROR_CANT_ACCESS_FILE winerror.h
The file can not be accessed by the system.
2 matches found for "b7000780"
I tried to uninstall IIS: 11/25
- uninstalled in windows features
- system did the work, I restarted system
- main system booted ok; then it treated the features
- the features uninstall failed at about 85% of total work
"We couldn't complete the features"
- system did a rollback
At reboot time, (some) services statuses are:
IIS runing auto IIS Admin Service (depends on HTTP service)
MSFTP off auto MS FTP Service (ftpsvc)
W3SVC off auto World Wide Web Publishing Service (depends on WAS)
WAS off auto Windows Process Activation Service
NetMsmqActivator off Auto Net.Msmq Listener Adapter
NetPipeActivator off Auto Net.Pipe Listener Adapter
NetTcpActivator off Auto Net.Tcp Listener Adapter
AppHostSvc off Auto Application Host Helper Service
==> THESE AUTO SERVICES ABOVE SHOULD BE RUNNING, BUT FAIL TO START PROBABLY DUE TO THE 'WAS' PROBLEM !
HTTP service is hidden, running:
sc queryex http ==> running
RPC and its dependencies are all OK, running.
I tried to uninstall WAS windows feature:
The system did the uninstall work, restarted, "could not complete features", rolled-back changes
I ran process monitor, but I could not see anything particular to resolve.
11/29 changed out the IIS configuration files, to use the clean.install versions:
C:\Windows\System32\inetsrv\config
I replaced applicationHost.config with applicationHost.config.clean.install (renamed it to the regular name)
I replaced administration.config with administration.config.clean.install (renamed it to the regular name)
I rebooted
I still could not start FTP or WAS, so maybe it's not getting far enough to read the configuration files?

Windows 8.1 / Windows 10 breaks my ASP.NET / IIS : "Service unavailable"

With Windows 8.1 finally released to MSDN/Technet today I came across the following issue running my ASP.NET application after doing an in place upgrade with Win 8.1 RTM:
Service Unavailable
HTTP Error 503. The service is unavailable.
The AppPool has died and shows a status of Stopped
The IIS log has nothing
There's a clue is in the Windows Application log which contains this error
The Module DLL C:\WINDOWS\system32\inetsrv\rewrite.dll failed to load. The data is the error.
How can I recover my IIS to make it work again?
It looks like a simple uninstall and re-install of the rewrite module will do the trick.
Edit: As others have said - try a repair first - if it works then that should be faster.
It doesn't look like the Microsoft Web Platform Installer is able to uninstall it so just go to Programs and Features to uninstall it.
You'll find it listed as IIS URL Rewrite Module 2 and just click the Uninstall button on top.
Then reinstall it from here:
http://www.iis.net/downloads/microsoft/url-rewrite
Make sure your App Pool is started - or just restart IIS and it should all work again.
Edit: 8/30/16 : A similar but unrelated error can occur if you have the 'new' .NET core installed and update to Win 10 Anniversary edition. See here: https://github.com/aspnet/Home/issues/1583 - Running a repair on VS 2015 Tooling Preview should fix it. Wanted to add it here since the errors are very similar to this answer.
I got this Event Log error after updating Win8.1 to Win10. To fix, go to the Control Panel -> Programs and Features, locate IIS URL Rewrite Module 2, right click and select Repair (it's quick). Next, restart your stopped AppPool(s). Should be OK now.
No need to uninstall nor reinstall.
Gary Davis
Don't need to uninstall. Just do a Repair instead, and it will works.
For some weird reasons, the only solution for me was to install previous version of the module, from https://www.microsoft.com/en-us/download/details.aspx?id=7435
I just ran in to this issue after an update. All of the app pools where stopped!
Starting them resolved the issue.
I struggled with similar issues last night.
It started out with a complaint about missing redirect.dll. After installing IIS' Redirect feature, that log message disappeared and all I was left with was a bunch of error messages from WAS. It tried starting my application pool five times until giving up.
A listener channel for protocol 'http' in worker process '120' serving
application pool 'my app pool' reported a listener channel failure.
The data field contains the error number.
The error code was "8007007E" (File not found according to google).
I then installed ProcMon from sysinternals.com and every time the w3wp process complained about "NAME NOT FOUND" right before terminating, I googled and installed the corresponding IIS feature. I repeated this until I had installed them all and got everything working again.
Installing everything is not a good solution, but I do not have time to investigate deeper right now.
I came across similar symptoms after changing my domain password. I had to also reset my password in my (hard coded!) App Pool settings on my dev box.
I had a similar issue with "httpplatformhandler.dll failed to load". Again the solution was to download the appropriate httpplatformhandler install msi from http://www.iis.net/downloads/microsoft/httpplatformhandler and then run a repair.
The Repair worked for me after updating to W10 Insider Preview 160826-1902
I encountered the same problem in Windows Server 2012 R2. After I update Windows Updates to newest, it works.

Resources