0

I retrieved Merge branch 'Release 1.1' of SignalR from github. In there are samples for ASP.NET and Silverlight, etc. When I run the ASP.NET sample it works. When I run the Silverlight sample, the connection.Start() throws a SecurityException.

I'm running IE10, Silverlight 5 and .NET 4.5.

In the Silverlight sample, see

MainPage.xaml.cs

        var scheduler = TaskScheduler.FromCurrentSynchronizationContext();
        connection.Start().ContinueWith(task => **// SecurityException here!**
        {
            var ex = task.Exception.InnerExceptions[0];
            App.ViewModel.Items.Add(ex.Message);
        },
        CancellationToken.None,
        TaskContinuationOptions.OnlyOnFaulted,
        scheduler);
John Mc
  • 212
  • 2
  • 16
  • Can you give details about the security exception? – Abhishek Nanda May 29 '13 at 18:52
  • Did you set up clientaccesspolicy.xml? See http://www.asp.net/signalr/overview/hubs-api/hubs-api-guide-net-client#slcrossdomain – tdykstra May 30 '13 at 17:08
  • The details of the security exception: I downloaded the entire SignalR solution from GitHub and set the Silverlight.Client project as startup. The error happens in the SignalR.Client project, HttpHelper.cs file, `GetHttpResponseAsync` method, `(HttpWebResponse)request.EndGetResponse(ar)` is the code fragment that causes the exception. – John Mc May 30 '13 at 22:55
  • Yes, I have **clientaccesspolicy.xml** in my web project. I also have this in my **Global.asax**: `routes.MapHubs(new HubConfiguration() { EnableCrossDomain = true });` – John Mc May 30 '13 at 22:56

0 Answers0