IIS/IISnode - not serving files (no error messages) - iis

I have a Node project running on a Windows server using IISNode on a Windows virtual machine.
Everything worked fine up until a few days ago when the VM underwent a Windows update, and now the site isn't serving any files.
When I start the server, there is no indication of anything being wrong, but when I go to the URL, I get the message:
www.mydomain.com didn't send any data
ERR_EMPTY_RESPONSE
Initially, when I was checking all the settings, I noticed that when I clicked 'Test Settings' under basic settings, that there was an authorization failure saying it cannot verify access to the source code directory.
But when I changed it to connect as specific user instead of application user, the error went away but the above issue was unchanged.
This makes me think it could be a permissions issue, but I've granted permission to the App Pool, IIS_IUSRS and IUSR, so I could be wrong.
I've tried multiple solutions on StackOverflow, including this highly rated one with no luck.
Any help would be appreciated.

Annoyingly, I found the answer a few hours after placing the bounty.
The problem was that it didn't have a static IP address, so when the VM was updated it was on DHCP and so was allocated a new IP, hence the website stopped working.

Related

IIS on windows 10 application pool keeps stopping

I am having an issue with IIS resulting in the app pool stopping, so I am getting a 503 error
Event Viewer reports
Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, and that your network is functioning correctly.
DETAIL - Access is denied.
Windows has backed up this user profile. Windows will automatically try to use the backup profile the next time this user logs on.
Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.
I believe this may be because I followed instructions I found on google to clear down files from AppData amongst other place, last week when C: became full (bad move ). Sadly, there is no backup to reinstate the lost files. I expect I have removed an account or permissions somehow.
I have tried setting Load User Profile to False and also setting Identity to LocalSystem but not allowed these settings in the app pool
I was hoping to reinstall IIS but cannot find a solution for that. Does anyone please have advice?

Getting error server unable to read htaccess file, denying access to be safe. My server keeps changing back to permission 710 automatically

So I've been using a VPS server from namecheap for the past 2 yrs or so and I use it to host some of my clients websites and dashboards to manage mobile apps. Since yesterday around noon all my websites & dashboards started loading the following error:
Forbidden
You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
I contacted my hosting support and they said my home folder for my server was set to permission 710 and using SSH on my WHM dashboard they changed to 711, right after that all my websites, dashboards and even mobile apps came back online and started working, then around 15 minutes later it happened again, I again contacted hosting support and they did the same process and everything came back online, I started to see a pattern here so I asked if they could explain how they changed permissions to 711 on SSH so I can do this myself if needed.
Well its been around 10hrs now and my websites, dashboards & mobile apps keep doing the same thing they go offline and cannot be accessed (For mobile apps they don't load any information) until I access WHM and change my home folder to permission 711.
So I know it has something to do with an htaccess file but have no idea which one or even why its automatically being changed every 15 minutes or so. One of the possibilities mentioned by hosting support was that I may have malware (Wouldn't know how) or one of my scripts uploaded has issues causing my whole server to keep crashing.
I already deleted the 2 scripts uploaded in the last two days but that didn't seem to fix anything, and hosting support takes so long to give me just the most basic answers but most importantly they are just giving me temporary fixes and say they have no idea why this is happening.
I am considering downloading each one of my scripts one by one until im only left with my main site and then start uploading them again one by one to see if I can locate the script causing all of this.
If you have any other ideas on why this could be happening I would really appreciate it if you guys can point me in the right direction.
Thanks!

CrushFTP on Azure VM giving "405 Method Not Allowed error" for POST method

We had CrushFTP installed on an Azure 2012 VM that recently died, so to speak. We wound up spinning up a new VM and reattaching the original data disk to the new VM.
After configuring IIS for the web portal part of CrushFTP, and cleaning up some script errors on the landing page, which is now on a 2016 VM, we get an HTTP 405 error when trying to log in to CrushFTP.
I checked to make sure the VM accepts POST requests - it does. The confusing thing is when I check the browser console, it's saying the server is NOT accepting POSTS, and this is happening both on our company network and from outside the network. I can see from our work network it's an issue with our proxy server, but from my mobile device outside of the network, I see the exact same rejected methods.
Any ideas? I don't have a whole lot of code to share since CrushFTP is a black box.
EDIT: I think the IIS setup was a red herring. I was going off some notes from a former co-worker who set this up, but I don't believe she set it up in IIS.
From what I'm reading, the CrushFTP HTTP server needs to be exposed as a public app through port forwarding in the VM. Whenever I run Crush locally on the VM, everything works fine. But since I set it up in IIS it hasn't worked.
I figured it out. I had to add an "Allow" entry of POST in IIS.

Azure Kudu Debug Console not accessible because of DNS error

I created a new Azure Web App (web site) on the path https://todoangular1-b-nschou.azurewebsites.net and I tried to access the Kudu Debug Console by inserting 'scm' between the application name and the domain name. Like this:
https://todoangular1-b-nschou.scm.azurewebsites.net/
However, the site is not available.
Some more research showed that the error was caused by a failing DNS resolution. I then added an entry to my hosts file pointing todoangular1-b-nschou.scm.azurewebsites.net to the same ip-address as todoangular1-b-nschou.azurewebsites.net and suddenly it worked.
My own conclusion is that the Azure platform did not properly add the new DNS-name under the scm.azurewebsites.net zone. Did anyone else experience this odd behavior?
What probably happened is that there was a small delay in DNS propagation. But if you try hitting the site before that, you would then be affected by DNS negative caching on your machine, which can last a little while. My guess is that during that time, if you had tried to access it from a different machine that didn't have the negative caching, it would have worked (and it works fine now).

IIS ApplicationPoolIdentity 503 error

I've recently ported to a different hosting company (VDS), and on the new server, installed IIS 7.5 Express, latest versions of PHP and MySQL.
I then copied the files from the old server to new server (NOTHING beyond the content of the folders of my websites, so no config files or anything except the web.configs in the sites themselves), set-up websites. I've tried to visit a website, and I got a 503 Service Unavailable message, tried both remotely and locally at the server, no change.
Tried on every site, even on Default Web Site, and no change: still 503.
I've checked the permissions to the folders of the websites (and all the children), and both my account, Network Service, Administrators have effectively full control of all the contents.
All the apps run in DefaultAppPool, which runs under ApplicationPoolIdentity. Tried creating a new app pool, moving sites there, no luck, tried setting "Load User Profile" to False in pool settings (read it here HTTP Error 503 on IIS 7.5 after SP Install), no change.
The event viewer in an extremely detailed way says:
"A process serving application pool 'DefaultAppPool' terminated unexpectedly. The process id was '2356'. The process exit code was '0xfffffffe'."
and nothing else. Five times of this error, and the pool is shut down due to rapid protection. I restart the pool, try again, nothing changes. No matter I'm trying to get an .aspx, .php, or static content. Here is the most weird part: when I set the app pool to run under LocalSystem, it works. No problem. But everything else fails.
I've checked the website folders about ten times, changed, erased, re-added rights etc tried everything but no change. It's as if there is another file that I'm forgetting to check that the pool's user is unable to access. But the event viewer does not help me. This started with the new server and I tried after installing everything, so I can't tell after what this started happening. I obviously won't be running under LocalSystem. Even my own user, Administrator, doesn't work.
The only identity that works is LocalSystem. My user, LocalService, NetworkService, ApplicationPoolIdentity all fail the same way. I'm going crazy, I'm 99% sure this is a user-rights issue. But all the website files are accessible, and I haven't changed anything in the system32 inetconfig or anywhere.
Ok, found my own answer again.
The process w3wp.exe runs under the DefaultAppPool user, not NETWORK SERVICE. I don't know why it doesn't run under NETWORK SERVICE, but after some research it turned out that the process needed access to C:\Windows\System32\inetsrv\config\schema and giving NETWORK SERVICE access didn't change anything. I've by coincidence found somewhere about the DefaultAppPool user, gave read permissions, and by starting the pool, all my websites started working perfectly. Quite weird, I always thought that the IIS processes ran under NETWORK SERVICE by default, and I'm sure that I haven't changed any setting.
Try running below commands with some changes
appcmd set apppool /apppool.name: <YourAppPoolHavingIssuesHere> /managedRuntieVersion:v<.net Framework version here>

Resources