This is a migrated thread and some comments may be shown as answers.

SSL possible?

6 Answers 107 Views
Window
This is a migrated thread and some comments may be shown as answers.
Adam Hubble
Top achievements
Rank 1
Adam Hubble asked on 27 Jul 2009, 12:53 PM
Hi, I am using RadWindow for login. Is it possible for radwindow to use SSL even if the page it is launched from is not https?

Thanks,
Matt

6 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 27 Jul 2009, 01:28 PM
Hello Matt,

Yes, this is possible - RadWindow is basically an IFRAME so anything you could achieve by using an IFRAME is possible with RadWindow as well. Note that in such case however, you will not be able to call functions from one page in another because the browser's security will not allow it.


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adam Hubble
Top achievements
Rank 1
answered on 27 Jul 2009, 01:45 PM
Hi Georgi, thank you for the prompt reply.

Do you mean clientside or serverside functions?

The only thing I really do "cross page" is to inject javascript in the radwindow telling the it to close and redirect the parent i.e
.... label.text = "<script etc>top.location.href='www.address.com';GetRadWindow().Close();</script>"

Would this be ok?

Thanks,
Matt
0
Accepted
Georgi Tunev
Telerik team
answered on 28 Jul 2009, 09:39 AM
Hello Matt,

GetRadWindow() gets a reference to the RadWindow object in the parent page so this part of the code will raise an error.
I see that in your code however, you are redirecting the parent page with top.location.href. I suggest to leave only this part - since RadWindow exists only in the context of the page from which it was called, when you redirect the browser, the window object will be destroyed anyway.
e.g.
label.text = "<script etc>top.location.href='www.address.com';</script>"

Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adam Hubble
Top achievements
Rank 1
answered on 29 Jul 2009, 08:31 AM
Thanks Georgi - I think I might come across another problem as I am also using RadAjaxManager1.ResponseScripts.Add(String.Format("GetRadWindow().Close();"))

On login button click event I am doing:
-----------
if page.isvalid then

if membership.validateUser(usernametextbox, passwordtextbox) then

formsAuthentication.SetAuthCookie(usernametextbox, rememberChkBx.Checked)
RadAjaxManager1.ResponseScripts.Add(String.Format("GetRadWindow().Close();"))

else .....

-----------

The last example I gave is kind of none critical as the script injection is just for a sign up page link (a 'nice to have'). The code above however obviously completes the login process by causing the loginRadWindow to close (onClientClose of RadWindow I then use window.location.reload(); to refresh the calling page - setting authentication cookies, showing the logged in view on the parent page).

This works great but might be hard to achieve if I cannot refresh the parent page.

Thanks,
Matt
0
Georgi Tunev
Telerik team
answered on 29 Jul 2009, 12:07 PM
Hi Matt,

You could achieve the same result with reloading the parent page instead of using the OnClientClose event handler, e.g. to output "top.location.href = top.location.href;". Note that if you are using location.reload(), if there was a postback on that page, the user will get a POSTDATA warning as reload() produces the same result as pressing the F5 key.


All the best,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adam Hubble
Top achievements
Rank 1
answered on 29 Jul 2009, 12:09 PM
Thanks for all your help Georgi.
Tags
Window
Asked by
Adam Hubble
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Adam Hubble
Top achievements
Rank 1
Share this question
or