Sunday, December 15, 2013

Deploy VS 2012 asp.net project to iis with ssl

Deploy asp.net project to iis from visual studio 2012
1. In visual studio 2012, open the asp.net project.
2. right click the project, and select "publish web site"" menu
3. select profile dropdown list, and <new> to create new profile
4. set the profile name, for example "iis"
5. select deploy method to "web deploy"
6. set server name to localhost, and site name to "Default Web Site/MyAppName"
7. then publish the application

Enable SSL for iis web app
1. From iis manager, select the root item
2. select "Server Certificates" icon, and click "create self-signed certificate" item
3. select the web site and click "binding..." (ssl only applies to web site, not individual app"), for port 443, select ssl certificate to the one just created.
4. select the web application, and click on "ssl settings" icon, check require SSL checkbox
5. visit the site with https:// and a certificate exception will be prompted.

Create certificate with customized common name
1. IIS only creates certificate which uses computer name as common name. If the web site name is different from computer name, then you need to create certificate differently.
2.Download selfssl7 from the link of http://blogs.iis.net/thomad/archive/2010/04/16/setting-up-ssl-made-easy.aspx, and unzip selfssl7.exe to local
3. run the below command to create the certificate
selfssl7 /N cn=torn00461340a.amer.global.corp.sap /K 1024 /V 18250 /X /F torn00461340a.pfx /W password
4. import the certificate to iis.






2 comments:

  1. Good blog. Keep sharing. I love them Are you also searching for Spanish writing help? we are the best solution for you. We are best known for delivering Spanish writing services to students without having to break the bank

    ReplyDelete
  2. I love it here. Reading your blogs is therapeutic. Keep sharing. I love them Are you also searching for do assignment for me? we are the best solution for you. We are best known for delivering cheap assignments to students without having to break the bank

    ReplyDelete