Welcome to my site! I hope you find something of value you here. Most of my posts (or rants) will fall into the three categories: Mathematics, Physics, or Computer Science. However, less frequently I may post a social topic or two.
Not too long ago, I accidently turned off one of the Remote Desktop services on my dedicated server. Of course, I immediately lost my Remote Desktop connection and had to email my hosting provider to get the service restarted. The cost for this incident was $75.00 and I can’t really complain because it was my fault.
Let’s get PowerShell and Windows Task Scheduler to keep this from happening again. The following script will start and ensure the correct settings of various Windows Services in IIS.
You will need to alter the script for your own purposes – the following code isn’t really intended to be a copy-and-paste solution. When your version of the script is perfected, use Task Scheduler to execute the script as frequently as necessary. My version runs every 15 minutes.
IIS Administrators are use to seeing some visitors abuse their sites. In certain situations the only option is to block the offending IPs. The netsh utility can greatly simplify the task of blocking one or more IP addresses in the Windows Firewall:
Blocked IPs Script
# Replace the comma separated IPs below with your list:
Change the location of the Symbols Cache:
In Visual Studio, click the Debug menu, and select “Options and Settings…“. In the dialog, select Symbols under Debugging. Change the location where the folders are created under “Cache symbols in this directory:“. I’ve chosen to keep mine in the Windows Temp folder. The PDB information will still be available but kept out of your solutions, projects, and best of all SVN.
Create a single PDB file instead of PDB Folders:
From your project’s properties, select Build, and click the “Advanced…” button at the bottom of the screen. In the dialog, select “pdb-only” from the “Debug Info:” list. This will create a single PDB file and prevent PDB folder from being generated. Developers are still responsible for keeping the PDB file out of SVN.