Skip to main content
Microsoft Silverlight
Home Forums Silverlight Programming Programming with .NET - General SL2B2 Read from EF not working
7 replies. Latest Post by JosephBrittoE on May 29, 2009.
(0)
NJP
Member
13 points
4 Posts
06-11-2008 1:21 PM |
Hi I am trying the following sample code:
using
{
InitializeComponent();
}
Link2Query);
but i get the following error:
System.InvalidOperationException occurred Message="Failed to Invoke: callOpen." StackTrace: at System.Windows.Browser.ScriptObject.Invoke(String name, Object[] args) at System.Data.Services.Http.ScriptObjectUtility.CallOpen(ScriptObject request, String method, String uri) at System.Data.Services.Http.HttpWebRequest.ScriptXmlHttpRequest.Open(Boolean async, String url, String method, Action OnReadyStateChange) at System.Data.Services.Http.HttpWebRequest.InvokeRequest(Boolean async) at System.Data.Services.Http.HttpWebRequest.BeginGetResponse(AsyncCallback callback, Object state) at System.Data.Services.Client.QueryAsyncResult.BeginExecute(MemoryStream requestContent) at System.Data.Services.Client.DataServiceRequest.BeginExecute(Object source, DataServiceContext context, AsyncCallback callback, Object state) at System.Data.Services.Client.DataServiceQuery`1.BeginExecute(AsyncCallback callback, Object state) at SilverlightApplication1.Page.btnClick_Click(Object sender, RoutedEventArgs e) InnerException:
Thanks in Advance,
NJ
06-11-2008 2:08 PM |
Figured it. It was because of this :-
"Unfortunately, due to work arounds required for other aspects of Data Services functionality, cross-domain access is not supported in the Data Services client included in Silverlight Beta 2. We're working to sort out the issue for the RTM release.
Pablo CastroSoftware ArchitectMicrosoft Corporationhttp://blogs.msdn.com/pablo"
Pablo Castro's post from the Astoria forum
dav_cup
6 points
6 Posts
10-10-2008 6:29 AM |
NJP: "Unfortunately, due to work arounds required for other aspects of Data Services functionality, cross-domain access is not supported in the Data Services client included in Silverlight Beta 2. We're working to sort out the issue for the RTM release.
Hi, have you solved for the RC0?
Thanks
MisterFa...
37 points
21 Posts
11-02-2008 10:16 PM |
Hi,
This does not seems to be a cross domain problem . Are you having both of your dataservice and webapplication in sam eporject or different project ?
Thanks,
Thani
ionutz
4 points
3 Posts
11-04-2008 3:19 AM |
I have the same problem. I think it's because my dataservice and webapplication are in different projects. It seams to me that it is a cross domain problem. Please help.
Thanks.
11-04-2008 3:49 AM |
Having dataservice and webapplication in two different projects equival to a crossdomain.
I read somewhere, sorry I don't have the link right now, that silverlight use the XMLHttpRequest to access the dataservice so has the same limit of Ajax. You have to use a server side proxy.
PS this is the link: http://blogs.msdn.com/phaniraj/archive/2008/10/21/accessing-cross-domain-ado-net-data-services-from-the-silverlight-client-library.aspx
11-07-2008 7:23 AM |
Thanks for the link. I have followed that tutorial but I still have a problem : AsyncCallback never returns a result and the CrossDomainHandler class crashes of NullReferenceException because it doesn't receive anything when GetResponseStream() is called. This cross-domain problem becomes a real pain to me. Please help.
JosephBr...
2 Posts
05-29-2009 2:56 AM |
Consuming ADO.NET Services into Silverlight Application
Entities context = new NorthwindEntities(new Uri(HtmlPage.Document.DocumentUri, "Northwind.svc"));
http://msmvps.com/blogs/theproblemsolver/archive/2009/01/06/consuming-an-ado-net-data-service-from-silverlight.aspx