I should have a simple logon form in ASP.NET MVC, I'm experiencing a problem with it. Basically my form looks a bit (using "logon", "account", new {domain = "buyer"}, FormMethod.Post, new {ID = "buyerslogogform"}):
)
I have a RequiresHTTPS filter on the logon action method but when it executes, I receive the following message
The requested resource only Can be accessed through SSL
The only solution to work at this point is to add an additional action HTMT editries The form was as follows:
var actionURL = "https: //" + Request.Url.Host + Request.Url.PathAndQuery; (HTML "benfinform" ("logon", "account", new {domain = "buyer"}, formmath.paste, new {id = "buyer logonform", @action = actionURL}))
Though it works, I wonder why I am seeing this issue for the first time and b) If there is a direct way to post https from a http page?
[edit]
I should have said that the logon dropdown will be available on many public pages. I do not want all my pages to be HTTPS. For example, my hope page - anyone who can see - should not be HTTPS Basically I need to specify the protocol in my form, but I do not know how to do this, or if it's possible.
I appreciate any advice / suggestions. Thanks in advance
JP
You can use
& lt; Form action = "& lt;% = Url.Action (" Action "," Controller ", VisualContact. RouteData.Values," https ")%>" Method = "post" & gt;
Comments
Post a Comment