radbyx
radbyx

Reputation: 9660

How to open a RadWindow using https

I have a site where we use a RadWindow as a confirm-popup.

Why does the popup not show/work on "https", when everything's works fine on "http"?

I can add more code if necessary, but this is the most important, I think. It's where my track ended..

string url = "../Controls/General/ScenarieBeregning/ScenariePopupPage.aspx";

        Log.Debug("popup . url: "+url+". "+DateTime.Now);
        string script = string.Format(
"radopen('" + url + "?skemaId={0}&redirect={1}','RadWindow1')",
            skemaId,
            redirect);
        ScriptManager.RegisterStartupScript(
Page, typeof(Page), "scenarieConfirmPopUp", script, true);

I tryed adding "https" in url and google this, but with not luck.

Anyone help is much appreciated.


I can share my solution:

        string protocol = Request.Url.Scheme; // HTTP eller HTTPS
        string url = protocol + "://" + WebConfigConstant.HostAppsetting +"/Controls/General/ScenarieBeregning/ScenariePopupPage.aspx"; 

Upvotes: 2

Views: 792

Answers (1)

Shahin
Shahin

Reputation: 12841

Check here
Telerik team :

The behavior that you experience is expected - if one of the pages is using HTTP and the other - HTTPS, you cannot access objects in one page from the other. Please note that this issue is not related to the RadWindow control - you will experience the same behavior if you are using a standard IFRAME instead. There is no other workaround in such scenario than to have both pages using the same protocol, otherwise it would be a major security hole.

Upvotes: 1

Related Questions