I have a partial view which is displayed on a non-HTTPS page, but POSTS to a controller that requires SSL. The form definition is this:
<form id="authForm"
method="post"
action="@Url.Action("authenticate", "auth", new {}, "https")">
The problem I'm having is that, within Visual Studio and when debugging, the host and port are localhost:64043
. However, the Url.Action
call above doesn't put the port number in, meaning the browser directs to my IIS installation. Do I have to add something else, or override this method? I want my application to be location agnostic.
Thanks in advance!