HTMLPlaceHolder and SSO

4 posts, 0 answers
  1. Ludovic Gerbault
    Ludovic Gerbault avatar
    226 posts
    Member since:
    Apr 2009

    Posted 30 Aug 2010 Link to this post

    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
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 31 Aug 2010 Link to this post

    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
  3. DevCraft banner
  4. Ludovic Gerbault
    Ludovic Gerbault avatar
    226 posts
    Member since:
    Apr 2009

    Posted 31 Aug 2010 Link to this post

    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.
  5. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 02 Sep 2010 Link to this post

    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
Back to Top