Link to home
Create AccountLog in
Avatar of nutnut
nutnutFlag for United Kingdom of Great Britain and Northern Ireland

asked on

IIS Express and a website that has HTTP and HTTPS pages

Hi

My website has HTTP and HTTPS pages.  I am using IIS Express and have it working for HTTP and HTTPS, but when its running I cannot browse from an HTTP to HTTPS (if in HTTP mode) and vice versa.  

How do I get IIS Express to allow me to browse HTTP page using HTTPS://localhost:44300/

Thanks
Avatar of karl-henrik
karl-henrik
Flag of Sweden image

Here is a link to how you enable SSL in IIS Express - pictures and everything.

Hope it helps.

Helpful link
Avatar of nutnut

ASKER

Thanks but I have ssl working already I just cannot switch between http and https when site is running
Hi Nutnut,

  I could be wrong, but I think you are misunderstanding a fundamental principle here - you can't have HTTP *AND* HTTPS on the same port.

  Assuming you want to use the pattern shown, you would want a binding to http for 8000 and for https on 44300 - then the urls would be http://localhost:8000/ and https://localhost:44300/ respectively.
Avatar of nutnut

ASKER

Hi, my site has half of it as HTTP and once logged in HTTPS is used.  When I run the site I cannot move between an HTTP and HTTPS page.  So, if I run IIS express in HTTP mode I can browse all HTTP pages but cannot log in.  If I run IIS express in HTTPs mode and make the log page the start page, I can log in and use all HTTPS pages but if I log out to the HTTP part of the site it just hangs.
That sounds more like a problem with whatever you are using for login authentication - it should be able to submit cookies and/or form info between the two, but if you are using an asp session variable to hold state, that often won't go well between http/https; asp session variables have this issue in IIS7 (in my experience) and I was gratified to find that it had been anticipated and there is a flag ("New ID on secure connection") you can configure to disable this behaviour and give a shared ASP session environment. I must admit though I haven't tried even that on a machine using non-standard port bindings, nor do I know if IIS Express even has such a flag.
Avatar of nutnut

ASKER

Thanks. Should HTTP page be able to be displayed on localhost:44300?  Because if I can get this working then its solved.
you can, but only if ssl isn't there.
you must have separate ports for ssl and non-ssl listeners.
Avatar of nutnut

ASKER

thanks how can i do this
ASKER CERTIFIED SOLUTION
Avatar of Dave Howe
Dave Howe
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account