Hello Guys!
I currently writting aplication and i have issue with HTTPS. Inside my project activated SSL Enabled = true and i was implementing Atribute like this:
[RequireHttps] [AllowAnonymous] public ActionResult Login(string returnUrl) { ViewBag.ReturnUrl = returnUrl; return View(); }
and when i trying to log in my connection is lost..
I might add that inside browser bar is missing port and looks like:
https://localhost/Account/Login
My question what should I
do to make HTTPS connection
to work finally?
Best regards!
Can you explain what you mean by connection is lost?
Keep in mind, for this to work you need a certificate installed and then bound to the site or else the site won’t respond to https requests. If you’re using the development server, you would be better to use IIS or IIS express for this. I don’t believe the
development server has any support for https which is why a more robust solution such as IIS or IIS Express is needed.
Just got error Failed to connect , but if i manualy typed port like this
- https://localhost:44301/Account/Login
i got side with certificate
is not trusted:
http://www.speedyshare.com/8r8Xs/Bez-tytulu.png
I’m using IIS Express and if you explain how can i install certificate i will be grateful
Hi Rejentt,
First, the default SSL port is 443. So for other SSL port, you need add it in the URL.
Secondly, for the certificate issue, you need to have the certificate for that site.
There is a link that may benefit you:
# Client Certificates Part 2 (Client Certs on the Browser)
http://jasonrshaver.com/?tag=/Client+Certificates
Best Regards
Starain