ASP.net debug https on localhost - asp.net

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.

Related

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

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.

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.

Setting up trust for SSL sites hosted in IISExpress

When I try to browse any SSL site in IISExpress over ports 44300 - 44399, the site shows up as untrusted.
The following links discuss how to setup IIS to serve externally and/or moving the cert from the Personal to Trusted root.
http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx
Create a Self-Signed Certificate within IIS Express
I don't really want to server externally over port 443. What I'd like is for the cert that IISExpress installs to be trusted so that any SSL sites in the port range 44300 - 44399 are considered trusted.
I've tried moving the IISExpress cert from the Personal to the Trusted root store but this does not seem to work.
Is this at all possible to do?
This is the way I did it, which is probably the simplest way possible:
Run your website to start IISExpress.
Run IE as an Administrator and browse to your SSL-enabled site.
Install the certificate into the Trusted Root Certification Authorities:
That's it.
I only recommend doing this on a development box. If the IISExpress cert isn't generated randomly for your machine (does it? I don't know), there are serious security implications for putting the cert in the trusted store. If you're concerned, better to follow the more complicated set up of creating your own CAcert locally.

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?

How can I showoff my ASP.NET application to my friends?

So, I made a cool demo which I want to show to my friends. But when I give them my IP-address (with the Development server's port and aspx page), it doesn't connect. How can I make it work?
They can't see the development server port.
It only serves pages to browser requests on the local computer.
You have to publish it to your IIS or to another machine that has IIS.
Deploy your site to your Local IIS server
The development server will only server connections from localhost. You need to deploy it to a real IIS server instance. Since you don't likely have Windows Server lying around, you can install IIS on any Professional edition of windows. Then your site will run on port 80, just like any other web site. You still may also need to forward that port on your home router.
Cassini (developers web server) has limitations and doesn't serve http requests from intranet/internet
You should deploy your site to IIS on your workstation (if your friends observe workstation via IP) or use Internet Asp.net Hosting
The development server can only be accessed by clients on the local box. You'll need to host your site on IIS to let them access it (assuming they're on your local network.) If you need to expose this on the internet, you'll have to get a hosting company to do that.
You are probably using the built-in webserver called cassini. By default, that webserver does only accept request from the localhost.
Set up a local IIS, and forward all necessary ports through the firewall
You should find a reliable and already configured webhost and host your site there. The first hit on google for "free asp.net host" was here.

Resources