Make IIS Express Listen on Your Hostname

Getting IIS Express to listen on your machine’s hostname (or hostnames) and not just localhost can be pretty handy.  From a high-level there are 3 basic steps:

  1. Change IIS Express Configuration for the Visual Studio Solution
  2. Tell http.sys to respond to requests from everyone
  3. Open the local firewall to incoming port 443

(more…)

Advertisements

Create A Self-Signed Certificate on Windows

Simple one-liner to create the certificate (requires Windows SDK):

"c:\Program Files (x86)\Windows Kits\8.0\bin\x86\makecert.exe" -r -pe -n "CN=venom" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -a sha256

The makecert command with those options will create a certificate that you can use for local SSL testing (among other things) and the encryption is strong enough to satisfy modern browsers.  The certificate gets stored in the machine certificate store.  You can examine it via mmc.