Deploying ASP.Net MVC 5 application on a server with SSL - asp.net

I've worked on an ASP.Net MVC 5 application using EF6. The project is ready for deployment and I've been told by the project manager that the project will be deployed on a server with IIS 7.0 using https/SSL. We will be running the server on our premises and the certificate has been purchased from GoDaddy. During development, I've not enabled SSL in Visual Studio project, and no certificate has been imported into Visual Studio.
My question are:
Do I have to enable SSL in Visual Studio and import SSL certificate before deployment, or I can publish the project as is, and enable SSL in IIS only?
When do we enable SSL in Visual Studio and import SSL certificate into it? My understanding is that it is done during development to enable testing on SSL, but I'm not sure if my understanding is correct.
If development has already been finished, is it still necessary to carry out the above scenario (enable SSL in Visual Studio and import SSL certificate in it)?

You can handle SSL in IIS- this is what my company currently does. You might want to look into the Url Rewrite Module in IIS. This enables your site to handle requests that are sent to http and https both and both types of request both end up forced going over ssl.

You can handle it on your server side by using your hosting cPanel/Plesk etc.Simply change all request the type on both http and https ,if you want to enable only https requests then configure it on only https .For more details how to configure and enable ssl on godaddy kindly view full details on the given link.
Link

This is how to configure an SSL web application in IIS Express.
After publishing SSL web application, just go to IIS Manager, right click on Sites, Add Website and fill in the Bindings section of the wizard like in the picture below (select https, select correct Port number from the SSL url shown in VS and the SSL certificate as well). Then you can browse to the published https web address rather than having to run in debug from VS.

Related

use https on asp.net application running on localhost

I've created an asp.net web application with a web form called "Main.aspx" in it. I'm trying to run the application over https. Since I have no experiences with SSL, IIS etc. I googled how to achieve this but every solution didn't work for me.
I enabled SSL using the following steps: Enable SSL
My application is now running on https://localhost:59917/.
But if I start my application I get a Firefox error message: "Secure connection failed". So I followed the steps from Scott Gu's Blog Post but it didn't work neither.
Does anyone have experiences in SSL and ASP.net web applications and can help me out?
If you followed the instructions, you should have configured your website on the port 443.
You should configure the binding on port 59917

How can I enforce IIS 8.5 Web Deploy to use SSL (HTTPS) Only

I've just set-up a website on Windows 2012 (IIS 8.5).
I'm using Visual Studio 2013, and I'm wanting to configure Web Deploy so that our developers can only deploy over SSL (HTTPS).
In the website settings I've configured the SSL for the site;
For the website binding, I only have HTTPS present;
However it seems that I can still publish using WebDeploy over HTTP and I can browse to the site using HTTP, even though the file in this case wasn't found.
My main requirement is to stop developers being able to publish over HTTP. How can I achieve this ?
I think you should try to redirect all HTTP Requests towards HTTPS
URL rewriting in IIS 7+:
http://blogs.msdn.com/b/kaushal/archive/2013/05/23/http-to-https-redirects-on-iis-7-x-and-higher.aspx
Make sure that you don't have another IIS web site (usually the Default Web Site) that binds to port 80 with All unsigned IP address and no host header. That kind of site is a "catch-all" site that gives you the 404.

Host asp.net site as HTTPS in IIS 7

I have developed and deployed ASP.Net site in IIS 7. It is working fine. Now my client is asking me to run the application using https only. So I decided to run the host under SSL.
But i am new to SSL or https. In many places it ask me to install the certificate.
How can i just enable a SSL without using X509 Certificates in IIS 7?.
Is there any steps/articles explains simple SSL with out X509 Certificates to run the sites with https? Or using Development Certificate will bring any issues?

IIS 7 Disabling "Require SSL"

Deployed an ASP.NET application to our internal production server as a virtual directory under the default web site. I had been getting 403 errors when trying to connect to it. So I verified the folder permissions and when I went to look at the IIS (7) SSL settings I saw that "Require SSL", "Require 128-bit SSL" and require client certificates have been enabled. This application does not need SSL.
The problem is that these checkboxes and radio buttons have been greyed out and I can't seem to figure out how to disable them. Also, in the upper right hand corner of the IIS manager, I see in the alerts box "The site does not have a secure binding (HTTPS) and cannot accept SSL connections.
How do I disable the SSL settings?
For anyone else having this issue, here is what I found that cleared the SSL configuration:
appcmd set config "Default Web Site" /section:access /sslFlags:None /commit:APPHOST
That was a bug in IIS Manager, the workaround is to temporarily add a binding using SSL so that the checkboxes become enabled, then uncheck them, and remove the ssl binding.
ALternatively using AppCmd, or Configuration Editor (in IIS Manager) you should be able to achieve that as well.
Just open IIS Manager, navigate to the site using the Tree view, and double click Configuration Editor, then select system.webServer/security/access in the section list. Change that value to None.
If your application has no relationship to your Default Site in IIS, you should really create your own Web Site in IIS so that you are completely isolated from the settings you would inherit from running in a virtual directory.
In the Bindings for your new site, distinguish your site from the Default Site by using a different port or alternately use a different domain name, such as a sub-domain of the domain used by the Default site (requires your internal DNS to be updated to support this new domain).

ASP.net debug https on localhost

I have to test a method out on my asp.net application that should work on https. Is there a way where I can run the application on localhost on https so I can debug it?
YOu could create a self signed SSL certificate and then create a web app with SSL and your self signed certificate on your local machine in IIS (use a URL like http://dummy.test and add that to the hosts file in the c:\windows\system32\drivers\etc folder, have it point to 127.0.0.1), then start VS, attach to the w3wp.exe process and you can debug.
Create a self-signed SSL certificate with IIS 6.0 Resource Kit SelfSSL
Yep, get yourself a self-signed cert and install it. Generally, though, I'd just disable the need for SSL in the local dev environment.

Resources