Wednesday, April 20, 2016

Enable Http(S) Ports for self hosted webservices on windows

HTTP:
netsh http add urlacl url=http://+:8080/ user=DOMAIN\user

HTTPS:
netsh http add urlacl url=https://+:443/ user=DOMAIN\user
netsh http add sslcert ipport=0.0.0.0:443 certhash=HASH appid={GUID} 

HASH = Zertifikat->Details->Fingerabdruck im SSL Serverzertifikat
COPY/PASTE Leerzeichen entfernen 
‎df25040067c714e1de83574f3e953a8220c88dfc ‎
df 25 04 00 67 c7 14 e1 de 83 57 4f 3e 95 3a 82 20 c8 8d fc

appid = GUID der Applikation
Properties->Application->Assembly Information->

GUID: (ist eher zur Info wird nicht abgeprüft) 88538482-54d6-4c3a-922d-1fbb0d5367b2

Beispiel: netsh http add sslcert ipport=0.0.0.0:443 certhash=df25040067c714e1de83574f3e953a8220c88dfc
appid={88538482-54d6-4c3a-922d-1fbb0d5367b2}