Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net mvc 3 - don't have option in project properties for "SSL Enabled"

I'm following the Pluralsight ASP.NET MVC 3 tutorial, module 7 - Security (which, by the way, is a great tutorial). In the Authorization section, at the 6:24 mark, it shows how to set the project property of SSL Enabled to true. My problem is, when I get into the project properties, I do not have that option. I only see Always Start When Debugging, Project File, and Project Folder. Does anyone know why I don't have the option for SSL Enabled, how I could make it appear, or a different way I can achieve the same result? I'm using Visual Studio 2010 SP1Rel.

In other reading, I saw someting about the setting requireSSL="true" in the Web.config file, under the authentication tag. Does this do the same thing as setting SSL Enabled = true under project properties? If not, could anyone give a brief explanation of the difference or point me to a good article? Thanks.

like image 553
neizan Avatar asked Jul 17 '12 07:07

neizan


People also ask

How do I enable SSL in Visual Studio for a .NET project?

How to Enable SSL in Visual Studio Development Server? In the Solution Explorer click on the WebAPIEnableHTTP Web API project and press F4 key on the keyboard which will open the Project Properties window. From the Project Properties window, we need to set the SSL Enabled property to true.

How do I enable SSL Certificate in Visual Studio?

NET project, you have to enable SSL property using Visual Studio. Before enabling this property, make sure that your properties window is visible by navigating to View menu and selecting the option Properties Window. You can also enable this window by using the keyboard shortcut F4.

How do you remove this project is configured to use SSL?

To fix this error, as suggested from this site: For an existing project configured for HTTPS, look at the properties pane for the application and set SSL Enabled from true to false. with message: "You can't remove SSL from this site because this Web project is currently configured to browse with this URL.

How do I disable https in Visual Studio?

You need to use the Web property page to change the project URL to the non-secure URL first. It will popup a message and ask to create a virtual directory to configure the application. Click "Yes" to allow. Once setting are saved, you can disable the SSL from project property and you are done.


1 Answers

I just figured out that this option is available if using IIS Express in the development environment, but not if using the VS Development Server, which my project was using. I solved my problem by right-clicking on the project in the Project Explorer window, then selecting "Configure Project for IIS" or something to that effect. Now the option for SSL Enabled shows up in the properties.

By the way, this is the web page that helped me figure out my problem.

Also, even though I figured out my primary question, I'd still be interested in any comments regarding my secondary question.

[EDIT] The shortcut to setting this is to right click on your project name in "Solution Explorer" and click Properties...In the Properties window, click on the "Web" tab, and then under "Servers" change the dropdown box to "IIS Express".

like image 86
neizan Avatar answered Sep 21 '22 02:09

neizan