ict.ken.be

Delivering solid user friendly software solutions since the dawn of time.

Cassini IIS Express remote access

Categories: .Net IIS Visual Studio

MIX Video from Scott Hanselman on IIS Express (starts on 32:50)

  • Right click on your project and choose "Use IIS Express", and with this (instead Cassini) you can access your debug site from any machine on your localhost.

IISExpress puts its config files in C:\Users\YOU\Documents\IISExpress\config rather than in some machine-wide location.

<site name="MvcApplication18" id="39">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="c:\users\scottha\documents\visual studio 2010\Projects\MvcApplication18\MvcApplication18" />
</application>   
<bindings>
<binding protocol="http" bindingInformation="*:15408:localhost" />
<binding protocol="https" bindingInformation="*:44302:localhost" />
<binding protocol="http" bindingInformation="*:80:hanselman-w500" />
</bindings>
</site>

Enable :

  • netsh http add urlacl url=http://hanselman-w500:80/ user=everyone
  • netsh firewall add portopening TCP 80 IISExpressWeb enable ALL
  • netsh http add urlacl url=http://+:8080/ user=iedereen

Disable:

  • netsh http delete urlacl url=http://hanselman-w500:80/

ps: if you have a windows 7 in dutch user=everyone will be user=iedereen

Remember to run cmd as administrator and hosts needs to have your ip for the address !

  • netsh http show urlacl
  • netsh http add urlacl url=https://mysite:443/ user=iedereen

 

Some additional things for me to remember:

update applicationhost.config

  • <binding protocol="http" bindingInformation="*:80:internalip" />
  • <binding protocol="http" bindingInformation="*:80:externalip" />

add port forwarding on router from external to internal

add both uracls

if (the format of the specified network name is invalid - IIS Error 0x800704BE)

  • netsh http show iplisten
  • netsh http add iplisten ipaddress=0.0.0.0
  • iisreset

 

more : Working with SSL at Development Time

  • makecert -r -pe -n "CN=xyz.eu" -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
  • netsh http add sslcert ipport=0.0.0.0:443 appid={214124cd-d05b-4309-9af9-9caa44b2b74a} certhash=YOURCERTTHUMBPRINTHASH (cert must still be in personal certificate folder, if it is in trusted root certification authorities it will fail with Error: 1312 A specified logon session does not exists.)