Got Web.config Mods? Site won’t start? App Pool starts and stops?

When your site wont start or is not loading properly there may be modifications to the web.config that have caused this and you might need to determine how to remove them.

You’ve already verified that the application pool identity password was not changed.  You can test this by opening notepad with the password as you know it.  If your password does not work, you can reset the password from any cli where you’re logged in as a domain admin, using this command

Net user dev-SP_Connect ?7!rt1*Z45$A /DOMAIN

Note: you dont have to enter the domain, for ex sp\dev-SP_connect, you just enter in the name of the domain account and don’t forget the /DOMAIN at the end.  Then after that is done, you should be able to set SharePoint to use this existing password

Set-SPManagedAccount -identity Domain\dev-SP_Connect -ExistingPassword (Convertto-Securestring “?7!rt1*Z45$A” -AsPlainText -Force)

At this point you should be able to start that application pool, provided the issue with it being stopped was due to a password issue

Now that you’ve already checked that the application pool is started (or maybe the web.config modifications wont let it), you need to see what else has changed.

So, you decide to see if there were any solutions deployed recently in the farm:

Get-SPSolution | Sort LastOperationEndTime | FT DisplayName, LastOperationEndTime

You checked services.msc and you can see that www service and iis admin service are started\running

(Get-Service W3SVC).Status

(Get-Service IISADMIN).Status

And they both said they were running (Hopefully they don’t run too far – Like the days before caller ID when you could call someone and ask them if their refrigerator was running, then when they said yes, you would say “Well, I hope it doesn’t run too far” )

You might want a report of what has changed in your web.config for a particular web application,

$w = get-spwebapplication -Identity http://yourWebAppURL

I would not start making changes here in the web.config at this point.  Instead, try to determine what has caused the changes.  Take a look at the time stamp on the web.config file, when was it modified?  Is this relatively the same as the last operation end time of one of the solution deployments, or near?

Is it possible that one of the web.config files is different that the others?  Maybe the SSRS add-in is not added to this server?  You can use a program like WinMerge, a free tool to compare files, WinMerge HomePage

Remember:  Things just do not change by themselves.  Someone or something makes the changes.  You could check who has logged into the server, take a look at the logging directory and see if there were any attempts to open central administration.  These attempts will be evidenced by the logs that start with “PSC”

web.config modifications should be the last resort and always, always, take a backup copy of the web.config file before making any changes to the existing web.config

Sometimes the issue is due to the server needs an IISRESET after the last changes that someone made to IIS.

when the issue is related to the Security Token Service Application Pool, you can sometimes get it’s heart beating again with this powershell

$sts = Get-SPServiceApplication | ?{$_ -match "Security"}

$h = Get-SPServiceHostconfig
$services = Get-SPServiceApplication
foreach ($service in $services) { $service.provision();
write-host $} 

Followed by an IIS reset

Good luck! and, I hope you figure out what happened to your site.