Note that there are some explanatory texts on larger screens.

plurals
  1. POendMethod never called in TaskFactory<T>.FromAsync()
    primarykey
    data
    text
    <p>I have the following Silverlight code.</p> <pre><code>Container container = new Container("http://localhost:8080/odata"); DataServiceQuery dsq = container.MyEntity; IEnumerable result = Task&lt;IEnumerable&gt;.Factory.FromAsync(dsq.BeginExecute, dsq.EndExecute, null).Result; </code></pre> <p>The problem I am experiencing is that <code>dsq.EndExecute</code> is never called. I watched the HTTP traffic in Fiddler and the request to <code>http://localhost:8080/odata/MyEntity</code> goes out and the response below is received. The Task just doesn't seem to acknowledge that a response was received.</p> <pre><code>HTTP/1.1 200 OK Server: ASP.NET Development Server/11.0.0.0 Date: Mon, 20 May 2013 15:04:16 GMT X-AspNet-Version: 4.0.30319 DataServiceVersion: 3.0 Cache-Control: no-cache Pragma: no-cache Expires: -1 Content-Type: application/atom+xml; charset=utf-8 Content-Length: 562 Connection: Close &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;feed xml:base="http://localhost:8080/odata/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"&gt; &lt;id&gt;http://schemas.datacontract.org/2004/07/&lt;/id&gt; &lt;title /&gt; &lt;updated&gt;2013-05-20T15:04:16Z&lt;/updated&gt; &lt;link rel="self" href="http://localhost:8080/odata/MyEntity" /&gt; &lt;author&gt; &lt;name /&gt; &lt;/author&gt; &lt;/feed&gt; </code></pre> <p>Am I doing something wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload