Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7838235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:02:39+00:00 2026-06-02T15:02:39+00:00

Does it need Certificate/License/Registration before launching the website using https ? I want to

  • 0

Does it need Certificate/License/Registration before launching the website using https?

I want to use the mentioned code in Global.asax file.

protected void Application_BeginRequest(Object sender, EventArgs e)
{
    Response.Redirect("https://" + Request.ServerVariables["HTTP_HOST"] 
+   HttpContext.Current.Request.RawUrl);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:02:41+00:00Added an answer on June 2, 2026 at 3:02 pm

    First of all, I think you will never reach it, as it will loop in the Application_BeginRequest over and over as you are redirecting all requests…

    Maybe what you’re after is redirecting if the request comes from a non secure connection (http), no?

    for that, see if the request comes from such connection like:

      protected void Application_BeginRequest(object sender, EventArgs e)
      {
         if (!HttpContext.Current.Request.IsSecureConnection)
            Response.Redirect(HttpContext.Current.Request.Url.AbsoluteUri.Replace("http://", "https://"));
      }
    

    Secondly, the HTTPS protocol needs to be up and running or you will get a ERR_SSL_PROTOCOL_ERROR error thrown.

    In Visual Studio, you can easily enable https in the project properties

    enter image description here

    and you will get the untruest warning

    enter image description here

    As Visual Studio generated (on installation) a default self signed certificated.

    In production environment you will need to:

    • if it’s an intranet application, just use the self-signed certificate
    • on a internet application, you do need to buy an SSL certificates, now-days they re cheaper and cheaper…

    From your comments I have some question myself now…

    • Do you understand what HTTPS does to the connection between client computer and server?
    • Do you really need a secure connection between the two?
    • What kind of data are you trying to secure?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why does C++ need and use pointers? I know they add power to the
I want my silverlight application to use windows authentication so the user does not
I am developing a java code that signs documents using a certificate token. So
I have a digital certificate that identifies a user. I need to use it
I use code that does basic HTTP authentication, see below. This works fine in
I am using makecert to create certificate i need to do it though c#
I need to write a code to check the validity of the digital certificate
I need to find a GPS location within my app which does not need
What is an artifact and why does Maven need it?
How does one start development in Silverlight? Does one need a new IDE? or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.