Self Signed Certificate only works with computer name not localhost

Last post 05-03-2008 4:18 AM by TorLanglo. 2 replies.

Sort Posts:

  • Self Signed Certificate only works with computer name not localhost

    01-29-2008, 4:15 PM
    • Loading...
    • Jackxxx
    • Joined on 04-13-2003, 11:43 AM
    • Northern California
    • Posts 1,549

    I wanted to test my app with SSL so I created a self signed certificate on my development pc. The certificate works fine, however, I have to specifly the computer name in the url. It will not work with localhost. Does anyone know why this is and how I can fix it.

    If I need to spell out the urls that use https, like https://computername/webapp/securepage.aspx. That would mean that they will not work when they are moved to a host.

    I should be able to set them as https://localhost/webapp/securepage.aspx.

    Any help is appreciated.

    Thank you

    Jackxxx
  • Re: Self Signed Certificate only works with computer name not localhost

    01-31-2008, 3:07 AM
    Answer

    Hi

    I face the same problems as you and not sure if it's possible to work with localhost in a self-signed scenario. But well it help if you know  computername of web host and spell out the urls like this?

      string urls   =  @"https://"+System.Environment.MachineName+@"/webapp/securepage.aspx";

     

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Self Signed Certificate only works with computer name not localhost

    05-03-2008, 4:18 AM
    Answer
    • Loading...
    • TorLanglo
    • Joined on 09-08-2006, 4:24 PM
    • Salt Lake City, UT
    • Posts 14

    In case anyone's still following this thread, it is possible to create a self-signed certificate with the domain name you need (e.g. localhost). I just spent half a day researching the subject, and finally found out how to use a command line tool such as MakeCert.exe to solve the problem.

    I wrote a short article on my blog about this, you'll find it here: http://torlanglo.spaces.live.com/blog/cns!97592022AD12DB22!345.entry.

    Hope this helps,

    Tor.

    --------
    Tor Langlo
    Koda Software
    Web: http://www.kodasoftware.com
    Blog: http://torlanglo.spaces.live.com
    Filed under: , , ,
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter