views:

553

answers:

2

I think i am missing something in https...

Currently i am using this to redirect the desired page from http to https

  If Not Request.IsSecureConnection Then
  Dim serverName As String = HttpUtility.UrlEncode(Request.ServerVariables("SERVER_NAME"))
  Dim filePath As String = Request.FilePath
  Response.Redirect(("https://" & serverName) + filePath)
  End If

Should i declare somewhere in the web.config the absolut links for https?

p.s. My links are relative

A: 

You can write an HttpModule and add it to the web.config.

jinsungy
A: 

if you want to use static url then you can add in web config

and after that you can get that value where ever you want like this //string strHost = ConfigurationManager.AppSettings.Get("url").ToString();

Hope this will solve your problem!! :)

ishwor