We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,620 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

how to redirect from https to http in asp.net?

Hello All,

I am creating a website with password-protected pages in it.

I have two type of customer: 1. Free 2. Paid

For paid customers, pages would be rendered over HTTPS whereas for free customer, pages will be rendered over HTTP.
However, pages for both types of users would be same.

Please note, the URL for the two users should be same except HTTP/HTTPS part.

I am new to HTTPS and want to know how to achieve this.
Also would like to know, sometimes when we browse some HTTPS page and few of the items like image are referenced over HTTP then we get a cross in Address Bar indicating that some of the resources are not over HTTPS.


How can we overcome this problem, any suggestions?

3
Contributors
2
Replies
5 Days
Discussion Span
2 Years Ago
Last Updated
4
Views
manjukakkadath
Newbie Poster
4 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Can you not use response.redirect?

You might want to create a global variable (or Session variable) that indicates whether you should use HTTP or HTTPS for the current user (you could also add it to the users object) and then any time you make a reference to a URL you use your variable for the front.

Also take a look at HTTPModules.

stbuchok
Practically a Posting Shark
882 posts since May 2011
Reputation Points: 138
Solved Threads: 124
Skill Endorsements: 2

In session login check whether user is paid or free and depending upon its value redirect it to http or https url

aspproject
Junior Poster in Training
Banned
78 posts since Apr 2011
Reputation Points: 1
Solved Threads: 3
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0758 seconds using 2.71MB