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

Sharepoint Silverlight Form Based Authentication

3 Answers 91 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dharmesh Trivedi
Top achievements
Rank 1
Dharmesh Trivedi asked on 14 Jan 2010, 04:19 AM
I confess this is not a telerik issue however I am running into problem using e.g. Telerik Bookcontrol and populating with sharepoint List.and Form based Authentication.

I get following error when I try to assign list cookiecontainer to authentication.asmx cookie container ...

Message: Unhandled Error in Silverlight Application Unable to set the CookieContainer. Please make sure the binding contains an HttpCookieContainerBindingElement.   at CompanySilverlightApplication.AuthenticationService.AuthenticationServiceClient.set_CookieContainer(CookieContainer value)
   at CompanySilverlightApplication.News.News_Loaded(Object sender, RoutedEventArgs e)
   at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
Line: 1
Char: 1
Code: 0


has anyone used silverlight , sharepoint and form based authentication and get data back .. in regular AD environment works but when it comes to FBA . everything breaks ...




3 Answers, 1 is accepted

Sort by
0
Tihomir Petkov
Telerik team
answered on 18 Jan 2010, 02:26 PM
Hello Dharmesh,

If you are not using the client stack, can you please switch to it and see if it helps?
http://www.wintellect.com/CS/blogs/jprosise/archive/2009/10/14/silverlight-3-s-new-client-networking-stack.aspx

Best wishes,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Bill Anderson
Top achievements
Rank 1
answered on 03 Mar 2010, 06:51 PM
I too am having the same issue. I know this isn't a telerik issue, but I want to create a photoviewer for silverlight. Here is what i have tried so far. CookieContainer is still null on the AuthenticationSoapClient object...

   HttpWebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
            
            AuthenticationSoapClient client = new AuthenticationSoapClient();
            (client.Endpoint.Binding as BasicHttpBinding).EnableHttpCookieContainer = true; //not sure if this is the right way to use this.      
            
            client.LoginCompleted += (o, e) =>
            {
                //Get the cookie
                if (e.Result.ErrorCode == LoginErrorCode.NoError)
                {
//client.CookieContainer IS NULL HERE.
                }
                else
                {
                    //BUMMER!
                }
            };

            client.LoginAsync("userid", "password");
0
Dharmesh Trivedi
Top achievements
Rank 1
answered on 03 Mar 2010, 10:02 PM
No need to do what you describing if you creating Silverlight webpart hosted inside the sharepoint...

Do following and it works for me
(1) Copy ClientBin directory (which includes your XAP file) to the 12 \.... \ControlTemplates\ClientBin
(2) Make sure you give execute script permission to  ClientBin   in IIS
(3) make sure if you do refer the fba site web services
(4)make sure your webpart pointing at the location 12 \.... \ControlTemplates\ClientBin\abc.xap

let me know if you run into any other problem.
Tags
General Discussions
Asked by
Dharmesh Trivedi
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Bill Anderson
Top achievements
Rank 1
Dharmesh Trivedi
Top achievements
Rank 1
Share this question
or