Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 11 of 11

Thread: Testing SSL in a local/dev environment.

  1. #1
    ASPDNSF Staff - Andrew Guest

    Default Testing SSL in a local/dev environment.


  2. #2
    ASPDNSF Staff - Andrew Guest

    Lightbulb Testing SSL and the storefront in a dev environment (not for production)

    Below I’ll explain how to test your storefront locally with a local ssl cert created using the IIS resource kit tools from Microsoft.

    1) First, download and install the Internet Information Services (IIS) 6.0 Resource Kit Tools.

    http://www.microsoft.com/downloads/d...displaylang=en

    2) Open SelfSSL command prompt. Programs > IIS Resources > SelfSSL >SelfSSL
    We need to create a fake ssl cert to use with our storefront.

    Syntax for SELFSSL:
    SELFSSL [/T] [/N:cn] [/K:keylength] [/V:duration-of-validity] [/S:site-id] [/Port] [/Q]

    Parameters:

    /T - Adds the self-signed certificate to the "Trusted Certificates" list. The local browser trusts the self-signed certificate only if this parameter has been specified.
    /N:cn - Specifies the common name of the certificate. The computer name is used if you do not specify a common name.
    /K:keylength - Specifies the certificate key length. The default is 1024.
    /V:duration-of-validity - Specifies the duration for which the certificate is valid. The default is 7 days.
    /S:site-id - Specifies the site ID of the SSL-protected site. The default is 1 for the default Web site.
    /Port - Specifies the SSL port. The default is 443.
    /Q - Specifies Quiet mode. In Quiet mode, any existent settings for the site are overwritten silently.

    Since I haven’t figured out how to assign the cert to localhost (not sure if it’s even possible) we will need to use the network name of the computer for /N. This is assigned by default if you don’t enter anything for the parameter.
    Another thing to take into consideration is if you have more than one website under IIS you may have to adjust the /S parameter. By default it assigns it to the default website.

    If there’s no need to adjust these settings simply type ‘SELFSSL /t to create the cert.

    3) Open IIS, right click on your website and choose prosperities. Select the directory security tab and click the ‘View Certificate’ button. Take note of what the cert is ‘issued to.’ For example mine is issued to ‘DESKTOP’ because it’s the name of my machine. This is the value we’ll use in the liveserver appconfig.

    4) Enter the admin of your storefront and bring up the appconfig page.
    Set the appconfig Liveserver to the name of your machine. Set UseSSL to true.

    5) Access the storefront on your local machine using the url http://nameofyourvomputer/nameofthes...rtualdirectory

    For example, I’m using http://DESKTOP/ml7021

    Enter the sign in page or the shopping cart and if you’ve setup everything correctly the site should enter SSL mode. In other words it should go from HTTP to HTTPS.

    Again, this is not for a production environment. Strictly for dev.

  3. #3
    DotnetKris is offline Member
    Join Date
    Jul 2006
    Location
    Canberra, Australia
    Posts
    62

    Default

    Thanks Andrew, good instructions. I'll be following those myself.

  4. #4
    AliT is offline Junior Member
    Join Date
    Sep 2008
    Posts
    5

    Default Help with SSL on dev environment please

    Hi there, thanks for this. But is this when you have an SSL for your live site and you want to make the dev site equivalent? Is this what you are solving? This is the issue i am facing now. We applied the ssl to the live environement but now the dev doesnt have ssl or behaves differently from the live. Note that the dev environment is using the same db as the live one. Is that ok?

  5. #5
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    If you've got the dev and live sites pointing at the same DB (very bad idea btw, kinda' defeats the purpose of a separate dev environment) then that's not going to work without some customization. The LiveServer AppConfig (which tells it what SSL cert name to look for) is going to cause you problems.

  6. #6
    Rita is offline Senior Member
    Join Date
    Mar 2009
    Posts
    124

    Post Iis 7.0

    Thanks for guidance. Is it possible to setup SSL in dev with IIS 7.0? I couldn't find out the link to download IIS 7.0 Resource tools.

  7. #7
    baba is offline Senior Member
    Join Date
    Dec 2008
    Posts
    123

    Default

    Rita,

    Hope this might help you

    http://weblogs.asp.net/scottgu/archi...tificates.aspx

    Thanks
    Baba

  8. #8
    Rita is offline Senior Member
    Join Date
    Mar 2009
    Posts
    124

    Thumbs up

    Thanks you very much for this link. Do you have idea about expiration of SSL certificate in local machine? How many days I can use that for testing purpose?

  9. #9
    ram is offline Senior Member
    Join Date
    Oct 2007
    Posts
    153

    Default

    I'm getting an error saying error opening site metabase key.

  10. #10
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    You'll get that if you use a site ID that doesn't exist. If you've installed the IIS Resource Kit already, open up the IIS Metabase Explorer -> LM -> W3SVC. The one you've seen right underneath it is the default site ID:1.

  11. #11
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Quote Originally Posted by Rita View Post
    Thanks you very much for this link. Do you have idea about expiration of SSL certificate in local machine? How many days I can use that for testing purpose?
    By default it's 7 days. But you can specify duration-of-validity by including the /v option in your command (e.g. SElFSSL /t /s:1 /v:30)