One complaint I hear a lot from the linux users who have to do windows admin work for a random project the most common thing I hear a complaint about is a bashrc equivalent. I’ve been asked about it a few times and knew you could do this at the local user level and replied with that but never thought about changing it at a system level.
If you’re mostly doing linux work you probably aren’t familiar with the scripting guy blog on microsoft.com. It has amazing content for doing windows automation work. Including a detailed description of how powershell profiles work 🙂
Understanding the Six PowerShell Profiles
Every now and then you run into errors that don’t seem to have a cause and just show you blankness.
In ASP.Net MVC I’ve ran across trying to debug a site and chrome only says “This webpage is not available“.
Looking at the console you’ll see a line that says:
Failed to load resource: net::ERR_CONNECTION_REFUSED
If this was python or ruby I’d likely be looking at built in logs and possibly D-Trace or S-Trace to see what is going on. Since it is on windows the tool I check right away is the event viewer. I checked Application events and there was nothing of importance but checking System Events reveals an error.
Unable to bind to the underlying transport for [::]:58926. The IP Listen-Only list may contain a reference to an interface which may not exist on this machine. The data field contains the error number.
So with the information that we can’t bind to port 58926 the next information that makes sense to track down is what is on that port. That means it is time to break out netstat:
netstat -ano | grep 58926
*If you don’t have grep installed (I get this via msysgit) you can also use powershell:
netstat -ano | select-string -simple 58926
With the process id (on the far right of the output) take a look at what needs to be killed using task scheduler. In this case apparently chrome has the port bound so kill chrome and then everything should be good. (Wasn’t that the theme of the first BUILD conference?)