<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Adam Salvo (z) - Technology|Data Access</title>
    <link>http://blog.salvoz.com/</link>
    <description>newtelligence powered</description>
    <language>en-us</language>
    <copyright>Adam Salvo</copyright>
    <lastBuildDate>Sat, 16 Jan 2010 22:49:01 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>adam@salvoz.com</managingEditor>
    <webMaster>adam@salvoz.com</webMaster>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=6c4cdab1-ffa0-4cba-b09c-3a2137bbb048</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,6c4cdab1-ffa0-4cba-b09c-3a2137bbb048.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,6c4cdab1-ffa0-4cba-b09c-3a2137bbb048.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=6c4cdab1-ffa0-4cba-b09c-3a2137bbb048</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>This post is part of my PDC09 Conference Notes series. These are my raw notes
taken while watching the various session videos from PDC09. Refer to my <a href="http://blog.salvoz.com/2009/11/25/PDC2009Notes.aspx">original
post</a> for some conventions I tried to use.</em>
        </p>
        <p>
PDC Session Link: <a title="Advanced WPF Application Performance Tuning and Analysis" href="http://microsoftpdc.com/Sessions/CL06">Networking
and Web Services in Silverlight</a></p>
        <p>
This session went over the different ways to expose data to a Silverlight application.
Data access requirements for Silverlight was grouped in two ways and presented as
the following graphic:
</p>
        <p>
          <a href="http://blog.salvoz.com/content/binary/WindowsLiveWriter/PDC09CL06NetworkingandWebServicesinSilve_EC4A/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.salvoz.com/content/binary/WindowsLiveWriter/PDC09CL06NetworkingandWebServicesinSilve_EC4A/image_thumb.png" width="244" height="122" />
          </a>
        </p>
        <p>
Each example fell somewhere on the X/Y axis of the chart above. Resource Centric was
explained to be CRUD operations, while operation centric was more behavior driven. 
</p>
        <p>
          <strong>Forms Over Data</strong>
        </p>
        <p>
The first examples were your typical forms over data applications, which are Resource
Centric and follow a Request/Reply model. 
</p>
        <p>
If you control, and have direct access to the data, then RIA services was recommended.
Aside from a short demo, not a lot of time was spent on RIA services, as there are
other presentations that get into the details. 
</p>
        <p>
Another option for when you control the data, is to use WCF Data Services, which exposes
your data in a RESTFul manner that adheres to the open data protocol (OData). In addition
to data you control, services like SharePoint expose the data contained with-in via
the open data protocol as well. The advantages to using OData sources over public
REST services, is that more is known about the data, so you get a better development
experience. 
</p>
        <p>
If you are working with a public data store exposed with REST, and it’s not OData,
then use the enhanced (for Silverlight 4) ClientHttp library. It has a good programming
model, and a lot of the deficiencies in previous versions have been solved. For example
there is now support for Basic HTTP Authentication secured with SSL.
</p>
        <p>
          <strong>2 Way and Streaming</strong>
        </p>
        <p>
The second group of examples looked at duplex and streaming scenarios. The first example
was a chat application which is an operation centric example that has some request/reply
elements, but mainly users a duplex model. WCF was the recommend technology to support
the duplex model. The included binary encoder provided a 71% performance improvement
over the standard text encoder, even over HTTP. Binary has been the default encoder
since Silverlight 3, but is only useful when both endpoints are .Net applications.
</p>
        <p>
Duplex itself can be setup in your WCF bindings in one of two ways. For internet scenarios,
you will need to use an HTTP binding, which is a polling based duplex model. While
not present in the beta that was released at PDC, there are plans to enable HTTP Chunking,
which would allow for multiple messages per HTTP request to increase performance.
For intranet scenarios, you can use the NetTcp binding for the best performance. Remember,
since this is WCF, you code once, and just change your bindings as needed.
</p>
        <p>
Silverlight 4 supports UDP multicast, but it is pretty much an intranet only solution,
as your network must be configured to support UDP multicast. 
</p>
        <p>
There is a new Silverlight TCP Socket Policy server project template in the online
template gallery (accessible in VS 2010). This makes it very easy to setup the policy
server to allow cross domain socket calls for your Silverlight application. An enhancement
being considered for Silverlight 4 is that if the application has been elevated, then
you will not need to worry about policies. 
</p>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=6c4cdab1-ffa0-4cba-b09c-3a2137bbb048" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>PDC09 – CL06: Networking and Web Services in Silverlight</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,6c4cdab1-ffa0-4cba-b09c-3a2137bbb048.aspx</guid>
      <link>http://blog.salvoz.com/2010/01/16/PDC09CL06NetworkingAndWebServicesInSilverlight.aspx</link>
      <pubDate>Sat, 16 Jan 2010 22:49:01 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;This post is part of my PDC09 Conference Notes series. These are my raw notes
taken while watching the various session videos from PDC09. Refer to my &lt;a href="http://blog.salvoz.com/2009/11/25/PDC2009Notes.aspx"&gt;original
post&lt;/a&gt; for some conventions I tried to use.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
PDC Session Link: &lt;a title="Advanced WPF Application Performance Tuning and Analysis" href="http://microsoftpdc.com/Sessions/CL06"&gt;Networking
and Web Services in Silverlight&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
This session went over the different ways to expose data to a Silverlight application.
Data access requirements for Silverlight was grouped in two ways and presented as
the following graphic:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blog.salvoz.com/content/binary/WindowsLiveWriter/PDC09CL06NetworkingandWebServicesinSilve_EC4A/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.salvoz.com/content/binary/WindowsLiveWriter/PDC09CL06NetworkingandWebServicesinSilve_EC4A/image_thumb.png" width="244" height="122"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Each example fell somewhere on the X/Y axis of the chart above. Resource Centric was
explained to be CRUD operations, while operation centric was more behavior driven. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Forms Over Data&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The first examples were your typical forms over data applications, which are Resource
Centric and follow a Request/Reply model. 
&lt;/p&gt;
&lt;p&gt;
If you control, and have direct access to the data, then RIA services was recommended.
Aside from a short demo, not a lot of time was spent on RIA services, as there are
other presentations that get into the details. 
&lt;/p&gt;
&lt;p&gt;
Another option for when you control the data, is to use WCF Data Services, which exposes
your data in a RESTFul manner that adheres to the open data protocol (OData). In addition
to data you control, services like SharePoint expose the data contained with-in via
the open data protocol as well. The advantages to using OData sources over public
REST services, is that more is known about the data, so you get a better development
experience. 
&lt;/p&gt;
&lt;p&gt;
If you are working with a public data store exposed with REST, and it’s not OData,
then use the enhanced (for Silverlight 4) ClientHttp library. It has a good programming
model, and a lot of the deficiencies in previous versions have been solved. For example
there is now support for Basic HTTP Authentication secured with SSL.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;2 Way and Streaming&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The second group of examples looked at duplex and streaming scenarios. The first example
was a chat application which is an operation centric example that has some request/reply
elements, but mainly users a duplex model. WCF was the recommend technology to support
the duplex model. The included binary encoder provided a 71% performance improvement
over the standard text encoder, even over HTTP. Binary has been the default encoder
since Silverlight 3, but is only useful when both endpoints are .Net applications.
&lt;/p&gt;
&lt;p&gt;
Duplex itself can be setup in your WCF bindings in one of two ways. For internet scenarios,
you will need to use an HTTP binding, which is a polling based duplex model. While
not present in the beta that was released at PDC, there are plans to enable HTTP Chunking,
which would allow for multiple messages per HTTP request to increase performance.
For intranet scenarios, you can use the NetTcp binding for the best performance. Remember,
since this is WCF, you code once, and just change your bindings as needed.
&lt;/p&gt;
&lt;p&gt;
Silverlight 4 supports UDP multicast, but it is pretty much an intranet only solution,
as your network must be configured to support UDP multicast. 
&lt;/p&gt;
&lt;p&gt;
There is a new Silverlight TCP Socket Policy server project template in the online
template gallery (accessible in VS 2010). This makes it very easy to setup the policy
server to allow cross domain socket calls for your Silverlight application. An enhancement
being considered for Silverlight 4 is that if the application has been elevated, then
you will not need to worry about policies. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=6c4cdab1-ffa0-4cba-b09c-3a2137bbb048" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,6c4cdab1-ffa0-4cba-b09c-3a2137bbb048.aspx</comments>
      <category>Technology/Conference Notes</category>
      <category>Technology/Data Access</category>
      <category>Technology/Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=a227c0a1-2c77-4356-b460-1c40de2d71b7</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,a227c0a1-2c77-4356-b460-1c40de2d71b7.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,a227c0a1-2c77-4356-b460-1c40de2d71b7.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a227c0a1-2c77-4356-b460-1c40de2d71b7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Tomorrow night I am presenting at the Madison .Net Users group. Tonight, I am pulling
my hair out, trying to get my demos to work. How far am I? Well I’m on my second demo,
but the first one involves 0 programming, so I don’t think that counts.
</p>
        <p>
What <strike>is</strike> was getting in my way, was a nasty System.Data.Services.Client.DataServiceRequestException,
complaining of an invalid DateTime value…somewhere. 
</p>
        <blockquote>
          <p>
            <font color="#ff0000" face="Consolas">System.Data.Services.Client.DataServiceRequestException
was unhandled<br />
  Message=An error occurred while processing this request.<br />
  Source=Microsoft.Data.Services.Client<br />
  StackTrace:<br />
       at System.Data.Services.Client.DataServiceContext.SaveResult.HandleBatchResponse()<br />
       at System.Data.Services.Client.DataServiceContext.SaveResult.EndRequest()<br />
       at System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions
options)<br />
       at System.Data.Services.Client.DataServiceContext.SaveChanges()<br />
       at Demo1.Program.AddEmployees() in C:\_Files\Projects\Demo1\Demo1Completed\Demo1Completed\Program.cs:line
48<br />
       at Demo1.Program.Main(String[] args) in C:\_Files\Projects\Demo1\Demo1Completed\Demo1Completed\Program.cs:line
19<br />
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly
assembly, String[] args)<br />
       at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)<br />
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()<br />
       at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)<br />
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)<br />
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)<br />
       at System.Threading.ThreadHelper.ThreadStart()<br />
  InnerException: System.Data.Services.Client.DataServiceClientException<br />
       Message=&lt;?xml version="1.0" encoding="utf-8"
standalone="yes"?&gt;<br />
&lt;error xmlns="</font>
            <a href="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata&quot;">
              <font color="#ff0000" face="Consolas">http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"</font>
            </a>
            <font color="#ff0000" face="Consolas">&gt;<br />
  &lt;code&gt;&lt;/code&gt;<br />
  &lt;message xml:lang="en-US"&gt;<strong>Error reading syndication item: 'Error
in line 5 position 14. An error was encountered when parsing a DateTime value in the
XML</strong>.'.&lt;/message&gt;<br />
&lt;/error&gt;<br />
       Source=Microsoft.Data.Services.Client<br />
       StatusCode=400<br />
       StackTrace:<br />
            at System.Data.Services.Client.DataServiceContext.SaveResult.&lt;HandleBatchResponse&gt;d__20.MoveNext()<br />
       InnerException: </font>
          </p>
        </blockquote>
        <p>
After installing Fiddler so I could analyze the post and it’s subsequent response,
I tried setting the Modified and Created properties on the Entity to DateTime.Now
to give them an actual value. The Modified and Created properties are on all SharePoint
list objects. I hadn’t bothered setting them, because they were of type DateTime?
and I assumed that SharePoint would set them. As a matter of fact, I watched a <a href="http://microsoftpdc.com/Sessions/FT12">PDC
session</a> on this very topic and <a href="http://blog.salvoz.com/2009/11/25/PDC09FT12WCFDataServices.aspx">blogged</a> about
it. In the demo, the only thing Pablo set was the name and the job title and posted
it via CURL, and it worked.
</p>
        <p>
I tried setting the values to null, but I got the same error (and why wouldn’t I).
I ended up setting the values to DateTime.Min value. This allows the POST operation
to succeed, and the Created and Modified values are correctly set by SharePoint.
</p>
        <p>
Other notes of interest:
</p>
        <ul>
          <li>
Even though I installed VS 2010 with .Net 4.0, I still had to install the Ado.Net
Data services 1.5 CTP2 for SharePoint 2010 to expose data via ListData.svc</li>
          <li>
When building an application in VS 2010 with the .Net 4.0, System.Data.Services.Client
is added for you when you add a Service Reference. You do not need to add a reference
to Microsoft.Data.Services.Client in the CTP 2.</li>
          <li>
Be sure to check out the different SaveChangesOptions available when you call SaveChanges
for your service. The batch option really speeds things up, but if one update fails,
they all fail. 
</li>
        </ul>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=a227c0a1-2c77-4356-b460-1c40de2d71b7" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>SharePoint 2010 WCF Data Services Time Waster</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,a227c0a1-2c77-4356-b460-1c40de2d71b7.aspx</guid>
      <link>http://blog.salvoz.com/2009/12/02/SharePoint2010WCFDataServicesTimeWaster.aspx</link>
      <pubDate>Wed, 02 Dec 2009 04:36:17 GMT</pubDate>
      <description>&lt;p&gt;
Tomorrow night I am presenting at the Madison .Net Users group. Tonight, I am pulling
my hair out, trying to get my demos to work. How far am I? Well I’m on my second demo,
but the first one involves 0 programming, so I don’t think that counts.
&lt;/p&gt;
&lt;p&gt;
What &lt;strike&gt;is&lt;/strike&gt; was getting in my way, was a nasty System.Data.Services.Client.DataServiceRequestException,
complaining of an invalid DateTime value…somewhere. 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font color="#ff0000" face="Consolas"&gt;System.Data.Services.Client.DataServiceRequestException
was unhandled&lt;br&gt;
&amp;nbsp; Message=An error occurred while processing this request.&lt;br&gt;
&amp;nbsp; Source=Microsoft.Data.Services.Client&lt;br&gt;
&amp;nbsp; StackTrace:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Services.Client.DataServiceContext.SaveResult.HandleBatchResponse()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Services.Client.DataServiceContext.SaveResult.EndRequest()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions
options)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Services.Client.DataServiceContext.SaveChanges()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Demo1.Program.AddEmployees() in C:\_Files\Projects\Demo1\Demo1Completed\Demo1Completed\Program.cs:line
48&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Demo1.Program.Main(String[] args) in C:\_Files\Projects\Demo1\Demo1Completed\Demo1Completed\Program.cs:line
19&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.AppDomain._nExecuteAssembly(RuntimeAssembly
assembly, String[] args)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Threading.ThreadHelper.ThreadStart()&lt;br&gt;
&amp;nbsp; InnerException: System.Data.Services.Client.DataServiceClientException&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Message=&amp;lt;?xml version="1.0" encoding="utf-8"
standalone="yes"?&amp;gt;&lt;br&gt;
&amp;lt;error xmlns="&lt;/font&gt;&lt;a href="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata&amp;quot;"&gt;&lt;font color="#ff0000" face="Consolas"&gt;http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"&lt;/font&gt;&lt;/a&gt;&lt;font color="#ff0000" face="Consolas"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;message xml:lang="en-US"&amp;gt;&lt;strong&gt;Error reading syndication item: 'Error
in line 5 position 14. An error was encountered when parsing a DateTime value in the
XML&lt;/strong&gt;.'.&amp;lt;/message&amp;gt;&lt;br&gt;
&amp;lt;/error&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Source=Microsoft.Data.Services.Client&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StatusCode=400&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StackTrace:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Services.Client.DataServiceContext.SaveResult.&amp;lt;HandleBatchResponse&amp;gt;d__20.MoveNext()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InnerException: &lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
After installing Fiddler so I could analyze the post and it’s subsequent response,
I tried setting the Modified and Created properties on the Entity to DateTime.Now
to give them an actual value. The Modified and Created properties are on all SharePoint
list objects. I hadn’t bothered setting them, because they were of type DateTime?
and I assumed that SharePoint would set them. As a matter of fact, I watched a &lt;a href="http://microsoftpdc.com/Sessions/FT12"&gt;PDC
session&lt;/a&gt; on this very topic and &lt;a href="http://blog.salvoz.com/2009/11/25/PDC09FT12WCFDataServices.aspx"&gt;blogged&lt;/a&gt; about
it. In the demo, the only thing Pablo set was the name and the job title and posted
it via CURL, and it worked.
&lt;/p&gt;
&lt;p&gt;
I tried setting the values to null, but I got the same error (and why wouldn’t I).
I ended up setting the values to DateTime.Min value. This allows the POST operation
to succeed, and the Created and Modified values are correctly set by SharePoint.
&lt;/p&gt;
&lt;p&gt;
Other notes of interest:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Even though I installed VS 2010 with .Net 4.0, I still had to install the Ado.Net
Data services 1.5 CTP2 for SharePoint 2010 to expose data via ListData.svc&lt;/li&gt;
&lt;li&gt;
When building an application in VS 2010 with the .Net 4.0, System.Data.Services.Client
is added for you when you add a Service Reference. You do not need to add a reference
to Microsoft.Data.Services.Client in the CTP 2.&lt;/li&gt;
&lt;li&gt;
Be sure to check out the different SaveChangesOptions available when you call SaveChanges
for your service. The batch option really speeds things up, but if one update fails,
they all fail. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=a227c0a1-2c77-4356-b460-1c40de2d71b7" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,a227c0a1-2c77-4356-b460-1c40de2d71b7.aspx</comments>
      <category>Technology/Data Access</category>
      <category>Technology/Programming</category>
      <category>Technology/SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://blog.salvoz.com/Trackback.aspx?guid=1a882d9c-0365-429a-a896-635d4e3b65d0</trackback:ping>
      <pingback:server>http://blog.salvoz.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.salvoz.com/PermaLink,guid,1a882d9c-0365-429a-a896-635d4e3b65d0.aspx</pingback:target>
      <dc:creator>Adam Salvo</dc:creator>
      <wfw:comment>http://blog.salvoz.com/CommentView,guid,1a882d9c-0365-429a-a896-635d4e3b65d0.aspx</wfw:comment>
      <wfw:commentRss>http://blog.salvoz.com/SyndicationService.asmx/GetEntryCommentsRss?guid=1a882d9c-0365-429a-a896-635d4e3b65d0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>This post is part of my PDC09 Conference Notes series. These are my raw notes
taken while watching the various session videos from PDC09. Refer to my <a href="http://blog.salvoz.com/2009/11/25/PDC2009Notes.aspx">original
post</a> for some conventions I tried to use.</em>
        </p>
        <p>
          <strong>FT12 -WCF Data Services: What's new the RESTful data services framework (Pablo
Castro)</strong>
        </p>
        <ul>
          <li>
Name changed from ADO.Net Data Services to WCF Data Services 
</li>
          <li>
REST 
<ul><li>
REST is not a Protocol, standard, or Format 
</li><li>
REST is an architectural style 
<ul><li>
Decoupling 
</li><li>
Scalability 
</li><li>
Layering</li></ul></li></ul><ul><li><em>Interesting way of defining REST. I always thought of it as some type of standard
based on HTTP (verbs).</em></li></ul></li>
        </ul>
        <ul>
          <li>
Resources 
<ul><li>
Represents the state of each of the entities your are modeling 
</li><li>
These resources (state) are the only thing that is viewable from the outside. <u>There
is no behavior.</u></li><li>
Each resource has an address. In this case, it's the URL 
</li><li>
Uniform Interface: Removes ambiguity of calls by constrain a system to a know interface. 
<ul><li>
In REST, you have GET, PUT, DELETE and POST. You do not have ApproveOrder, VerifyCreditCard,
etc. 
</li></ul></li></ul></li>
        </ul>
        <ul>
          <li>
Date Service is not a gateway to the database 
<ul><li>
There is almost always some type of business logic between the service and the data
store 
</li><li><em>I think that this business logic is a subset of what you might find in a Line
of Business app, with additional logic as required in order to properly expose via
a service. </em></li><li>
The business logic could be responsible for security, and performance considerations
(i.e. don't allow something that will do a SELECT * FROM Table, where table has millions
of rows).</li></ul></li>
        </ul>
        <ul>
          <li>
Open Data Protocol (Astoria =&gt; Ado.Net DS =&gt; WCF Data services) 
<ul><li>
RESTful over http 
</li><li>
Poke-able (just open a browser and type a URL and see what comes back) 
</li><li>
HTTP: Transport, interaction model, control information in headers 
</li><li>
AtomPub: Format, introduces things like collections and links. 
</li><li>
Team added extensions to AtomPub as needed 
</li><li>
Introduced a json serialization option, which is useful when consuming from javascript. 
</li></ul></li>
        </ul>
        <ul>
          <li>
URL 
<ul><li>
The URL is independent of the format of the data returned (json, atom, etc). So you
can pass the URL around and it will not impact the format. The format is defined in
the GET request (accept: applicat/json). 
</li><li>
Extra stuff goes in query string (?). Use &amp; to append, just like normal query
string. 
</li><li>
(#): Query by primary key. /Categories(6)/Products would return all products for Category
6 
</li><li>
Filter strings: ?#filter=Color eq 'Red' 
</li><li>
Return first x rows: $top=# 
</li><li>
Sorting: $orderby=ColumnName 
</li><li>
Eger Load: $expand=ChildCollectionName 
</li><li>
Only get certain columns: $select=Column1,Column2</li></ul></li>
        </ul>
        <ul>
          <li>
Where used 
<ul><li>
.Net 
</li><li>
Sharepoint 2010 (install/enable Astoria?, and then you can access all sharepoint data
from /vti_bin/listdata.svc/ListName). There is full business logic running, so it
will check for authentication, update everything as necessary when you update the
actual data. 
</li><li>
Reporting Services 
</li><li>
Azure Table Storage 
</li><li>
Codename "Dallas" 
</li><li>
Microsoft Media Room 
</li><li>
Open Government data initiative 
</li><li>
3rd Parties 
<ul><li>
IBM WebSpehere Extreme Scale 
</li><li>
Db4o 
</li><li>
Telerik Open Access 
</li><li>
LinqPad</li></ul></li></ul></li>
        </ul>
        <ul>
          <li>
VS Support 
<ul><li>
Add Service Reference now supports consuming data from the Open Data Protocol (needs
to expose meta data) 
</li><li>
You'll get a data context type after adding the service reference 
</li><li>
Do something like: MyDataContextType svc = new MyDataContextType(URL), and then you
can drill down into svc to access the various collections of entities that are exposed.
Has support for adding (method), and I'm assuming updating as well. 
</li><li>
Full support for linq. 
</li><li><em>It would be interesting to view the SQL being generated behind the scenes using
Query Analyzer</em></li><li>
You can view the service as a diagram and get a schema diagram. 
</li></ul></li>
        </ul>
        <ul>
          <li>
Excel 2010 with Power Pivot 
<ul><li>
Import a data feed using just the URL from WCF Data Services 
</li><li>
And then you can just work with it in Excel 
</li><li>
Works with the open data access for SharePoint as well. 
</li></ul></li>
        </ul>
        <ul>
          <li>
Latest version of SSRS (must be SQL 2008 R2) 
<ul><li>
Every report has it's data exposed via this open data protocol. 
</li><li>
Browse to the report, the new report viewer has a button that allows you to export
as feed.</li></ul></li>
        </ul>
        <img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=1a882d9c-0365-429a-a896-635d4e3b65d0" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.salvoz.com">Adam Salvo</a>. 
</body>
      <title>PDC09 – FT12: WCF Data Services</title>
      <guid isPermaLink="false">http://blog.salvoz.com/PermaLink,guid,1a882d9c-0365-429a-a896-635d4e3b65d0.aspx</guid>
      <link>http://blog.salvoz.com/2009/11/25/PDC09FT12WCFDataServices.aspx</link>
      <pubDate>Wed, 25 Nov 2009 03:03:36 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;This post is part of my PDC09 Conference Notes series. These are my raw notes
taken while watching the various session videos from PDC09. Refer to my &lt;a href="http://blog.salvoz.com/2009/11/25/PDC2009Notes.aspx"&gt;original
post&lt;/a&gt; for some conventions I tried to use.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;FT12 -WCF Data Services: What's new the RESTful data services framework (Pablo
Castro)&lt;/strong&gt; 
&lt;ul&gt;
&lt;li&gt;
Name changed from ADO.Net Data Services to WCF Data Services 
&lt;li&gt;
REST 
&lt;ul&gt;
&lt;li&gt;
REST is not a Protocol, standard, or Format 
&lt;li&gt;
REST is an architectural style 
&lt;ul&gt;
&lt;li&gt;
Decoupling 
&lt;li&gt;
Scalability 
&lt;li&gt;
Layering&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Interesting way of defining REST. I always thought of it as some type of standard
based on HTTP (verbs).&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Resources 
&lt;ul&gt;
&lt;li&gt;
Represents the state of each of the entities your are modeling 
&lt;li&gt;
These resources (state) are the only thing that is viewable from the outside. &lt;u&gt;There
is no behavior.&lt;/u&gt; 
&lt;li&gt;
Each resource has an address. In this case, it's the URL 
&lt;li&gt;
Uniform Interface: Removes ambiguity of calls by constrain a system to a know interface. 
&lt;ul&gt;
&lt;li&gt;
In REST, you have GET, PUT, DELETE and POST. You do not have ApproveOrder, VerifyCreditCard,
etc. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Date Service is not a gateway to the database 
&lt;ul&gt;
&lt;li&gt;
There is almost always some type of business logic between the service and the data
store 
&lt;li&gt;
&lt;em&gt;I think that this business logic is a subset of what you might find in a Line
of Business app, with additional logic as required in order to properly expose via
a service. &lt;/em&gt; 
&lt;li&gt;
The business logic could be responsible for security, and performance considerations
(i.e. don't allow something that will do a SELECT * FROM Table, where table has millions
of rows).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Open Data Protocol (Astoria =&amp;gt; Ado.Net DS =&amp;gt; WCF Data services) 
&lt;ul&gt;
&lt;li&gt;
RESTful over http 
&lt;li&gt;
Poke-able (just open a browser and type a URL and see what comes back) 
&lt;li&gt;
HTTP: Transport, interaction model, control information in headers 
&lt;li&gt;
AtomPub: Format, introduces things like collections and links. 
&lt;li&gt;
Team added extensions to AtomPub as needed 
&lt;li&gt;
Introduced a json serialization option, which is useful when consuming from javascript. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
URL 
&lt;ul&gt;
&lt;li&gt;
The URL is independent of the format of the data returned (json, atom, etc). So you
can pass the URL around and it will not impact the format. The format is defined in
the GET request (accept: applicat/json). 
&lt;li&gt;
Extra stuff goes in query string (?). Use &amp;amp; to append, just like normal query
string. 
&lt;li&gt;
(#): Query by primary key. /Categories(6)/Products would return all products for Category
6 
&lt;li&gt;
Filter strings: ?#filter=Color eq 'Red' 
&lt;li&gt;
Return first x rows: $top=# 
&lt;li&gt;
Sorting: $orderby=ColumnName 
&lt;li&gt;
Eger Load: $expand=ChildCollectionName 
&lt;li&gt;
Only get certain columns: $select=Column1,Column2&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Where used 
&lt;ul&gt;
&lt;li&gt;
.Net 
&lt;li&gt;
Sharepoint 2010 (install/enable Astoria?, and then you can access all sharepoint data
from /vti_bin/listdata.svc/ListName). There is full business logic running, so it
will check for authentication, update everything as necessary when you update the
actual data. 
&lt;li&gt;
Reporting Services 
&lt;li&gt;
Azure Table Storage 
&lt;li&gt;
Codename "Dallas" 
&lt;li&gt;
Microsoft Media Room 
&lt;li&gt;
Open Government data initiative 
&lt;li&gt;
3rd Parties 
&lt;ul&gt;
&lt;li&gt;
IBM WebSpehere Extreme Scale 
&lt;li&gt;
Db4o 
&lt;li&gt;
Telerik Open Access 
&lt;li&gt;
LinqPad&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
VS Support 
&lt;ul&gt;
&lt;li&gt;
Add Service Reference now supports consuming data from the Open Data Protocol (needs
to expose meta data) 
&lt;li&gt;
You'll get a data context type after adding the service reference 
&lt;li&gt;
Do something like: MyDataContextType svc = new MyDataContextType(URL), and then you
can drill down into svc to access the various collections of entities that are exposed.
Has support for adding (method), and I'm assuming updating as well. 
&lt;li&gt;
Full support for linq. 
&lt;li&gt;
&lt;em&gt;It would be interesting to view the SQL being generated behind the scenes using
Query Analyzer&lt;/em&gt; 
&lt;li&gt;
You can view the service as a diagram and get a schema diagram. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Excel 2010 with Power Pivot 
&lt;ul&gt;
&lt;li&gt;
Import a data feed using just the URL from WCF Data Services 
&lt;li&gt;
And then you can just work with it in Excel 
&lt;li&gt;
Works with the open data access for SharePoint as well. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
Latest version of SSRS (must be SQL 2008 R2) 
&lt;ul&gt;
&lt;li&gt;
Every report has it's data exposed via this open data protocol. 
&lt;li&gt;
Browse to the report, the new report viewer has a button that allows you to export
as feed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://blog.salvoz.com/aggbug.ashx?id=1a882d9c-0365-429a-a896-635d4e3b65d0" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.salvoz.com"&gt;Adam Salvo&lt;/a&gt;. </description>
      <comments>http://blog.salvoz.com/CommentView,guid,1a882d9c-0365-429a-a896-635d4e3b65d0.aspx</comments>
      <category>Technology/Conference Notes</category>
      <category>Technology/Data Access</category>
      <category>Technology/Sql</category>
    </item>
  </channel>
</rss>