We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS Express - How to turn on https and others? [Answered]RSS

9 replies

Last post Mar 02, 2011 06:58 PM by kevin a

  • IIS Express - How to turn on https and others?

    Sep 07, 2010 02:11 PM|Nyla Pareska|LINK

    I read that IIS Express already supports SSL and urlrewriting. But how to turn it on? Is there some tool like inetmgr for it?
  • Re: IIS Express - How to turn on https and others?

    Sep 07, 2010 02:33 PM|kateroh|LINK

    IIS Express is integrated into WebMatrix and for now WebMatrix is to IIS Express what InetMgr is to IIS.
    To install IIS Express, you first need to install Web Matrix. Then, you will be able to turn on SSL through the UI and/or config. URL rewrite module ships together with WebMatrix, so all your URL rewrite rules will work.

  • Re: IIS Express - How to turn on https and others?

    Sep 07, 2010 03:43 PM|Nyla Pareska|LINK

    Hi,

    any idea where in WebMatrix I can get to that?

  • divyaa divyaa

    40 Posts

    Microsoft

    Re: IIS Express - How to turn on https and others?

    Sep 08, 2010 03:46 AM|divyaa|LINK

    Hello Nyla,

    You could turn on SSL from the UI but for the URLRewrite rules, you will have to be dependent on config because as of now the UI does not support configuring URLRewrite in IISExpress.

    To turn on SSL, Open a site in WebMatrix and then select the Settings Tab on the Site Workspace.

    You will find it under SSL Connection setting. Make sure you click on save button after checking this box else the changes will not take into affect.

     Also note that the port number does change when you enable SSL.

    Hope this helps.

    Regards,
    Divya

  • Re: IIS Express - How to turn on https and others?

    Sep 13, 2010 04:51 PM|DanAtkinson|LINK

    Hi there! I've tried implementing this but for some reason, the port will not work on 443. If defaults to 44300, but changing it to 443 doesn't work. IIS Express will load, but when I try to go to the page, I can't get a response. Is there any reason for this? I also posted my question about this on Stack Overflow - http://stackoverflow.com/questions/3690901/iis-express-defaulting-to-port-44300-for-https-when-enabling-ssl. Many thanks, Dan
  • divyaa divyaa

    40 Posts

    Microsoft

    Re: IIS Express - How to turn on https and others?

    Sep 14, 2010 02:46 AM|divyaa|LINK

    Hello Dan,

    Once you enable SSL for a website in WebMatrix, it defaults to port 44300 and does all the bindings in the background. I am hoping that you tried to change this port to 443 in the config file. Once that is done and saved, you also need to modify the binding in http.sys. You would need to delete the existing entry for port 44300 and add the entry for port 443.

    To do this, you could use httpcfg (WinXp/Win2003) or 'netsh http' (WinVista/Win2K8/Win7).

    Here are the commands for netsh:
    1) Get the appid and certhash for the existing entry of 44300 (I assume, you are going to use the same certificate which WebMatrix installs by default. If you want to change the certificate as well, get the certificate hash of the certificate from the certificate store): netsh http show sslcert. In the output search for entry for port 44300 and copy certhash and appID.
    2) Delete the entry for 44300: netsh http delete sslcert ipport=0.0.0.0:44300
    3) Add a new entry for port 443 with certhash and appID copied in step 1.
    netsh http add sslcert ipport=0.0.0.0:443 certhash=<certhash> appid=<appid>

    After configuring the entry in http.sys, you need to restart http service for the changes to take effect.

    net stop http
    net start http

    Let me know if you have any question on the steps.

    Divya

  • Re: IIS Express - How to turn on https and others?

    Sep 14, 2010 05:10 AM|DanAtkinson|LINK

    Hi Divya,

    Thank you for your quick response!

    I have Win XP so I ran the following command (for the benefit of others after me):

    #To get the SSL cert hash and guid

    httpcfg query ssl

    #To set the SSL cert

    httpcfg set ssl /i 0.0.0.0:443 /g {MY-GUID-INCLUDING THE CURLY BRACES} /c MY /h "MY HASH"

    Many thanks for your speed answer! Also, if you use Stack Overflow, you should pop over there and answer the question that this is related to!

    Dan Atkinson

  • divyaa divyaa

    40 Posts

    Microsoft

    Re: IIS Express - How to turn on https and others?

    Sep 14, 2010 05:29 AM|divyaa|LINK

    Hi Dan,

    Please refer this forum link http://forums.iis.net/t/1171280.aspx on Stack Overflow.

    Thanks
    Divya [MSFT]

  • Re: IIS Express - How to turn on https and others?

    Sep 14, 2010 06:45 AM|DanAtkinson|LINK

    Hi there, I've made the change to the url. Cheers, Dan
  • Re: IIS Express - How to turn on https and others?

    Mar 02, 2011 06:58 PM|Kevin A|LINK

    This worked for me, however it took a bit of work. One of the zeros in my hash for no apparent reason was not showing, I managed to get the hash from the advice on http://blogs.iis.net/divyaa/archive/2010/09/23/changing-the-default-self-signed-certificate-for-a-website-in-webmatrix.aspx