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

HTMLPlaceHolder and SSO

3 Answers 83 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Ludovic Gerbault
Top achievements
Rank 1
Ludovic Gerbault asked on 30 Aug 2010, 10:54 AM
Hello Guys

I'm coming today with some very specific questions.

Let me explain the situation :

I'm currently builidng some sort of widget thingy using Silverlight 4 OOB support.
My silverlight control only holds a RadHtmlPlaceHolder to which I'm passing the URL of a secure website.

To connect to this website, I need to send it the windows credentials.

What I want to do is using some sort of webservice to get the windows session credentials, return them in silverlight and pass them to the website so that when the OOB application starts, it would display in it the website already logged in with the session credential.

Hope it's all clear and you have some sort of ideas for me.

It also is kind of urgent.

Thanks for your help

3 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 31 Aug 2010, 04:34 PM
Hello Subileau,

This scenario is not supported and let me try and explain why. Let's assume you've successfully obtained the windows credentials and you have them as strings within your Silverlight 4 OOB application. Now, you have to send them via web request from RadHtmlPlaceholder to your secure web server. Internally, RadHtmlPlaceholder uses a WebBrowser control to display the web page. We don't have access to the WebBrowser's web request (in particular the header information) thus we can't include the credentials. All you can do is append them to the URI (ex: http://www.telerik.com?username=foo...) but this is considered not a good practice since it is not secure. Additionally, you can take a look at this StackOverflow thread for further information on the WebBrowser control's usage.

Greetings,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 31 Aug 2010, 04:48 PM
Well, actually, I got my probleme solve using the authentication mechanisms in sharepoint side.

But still, I was starting to get results using something like that :

WebClient client = new WebClient();         
client.Credentials = new NetworkCredential(username, login);
client.UseDefaultCredentials = true;
client.DownloadStringCompleted +=new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
client.DownloadStringAsync(new Uri("http://mysecureurl"));

And then

void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
      {
          html.HtmlSource = e.Result;
      }


The thing is, e.Result always raised an excpetion raising an error saying BrowserHttpStack can't handle custom credentials or something like that.

Maybe there is a workaround start in there, i don' tknow.
0
Kiril Stanoev
Telerik team
answered on 02 Sep 2010, 02:12 PM
Hi Subileau,

To be honest, I haven't encountered such an exception. Does googling it give any clues? Let me know if you manage to workaround the issue.

Sincerely yours,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
HTMLPlaceHolder
Asked by
Ludovic Gerbault
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Ludovic Gerbault
Top achievements
Rank 1
Share this question
or