Partilhar via


TechEd Europe – DEV309 – WCF Data Services, A Practical Deep-Dive – Session Demos Download

As promised in the last session of this year’s TechEd Europe which I had today on WCF Data Services, here you find the complete demo-code for download.

Click here to get to the session demo-downloads.

Please consider the following notes to make the demos working on your machine.

  • You need SQL Server (or SQL Server Express).
  • If you use SQL Server Express, you need to modify the connection strings in the backend to point to (local)\SQLEXPRESS.
  • Next execute GenerateDatabase.sql to create the database using SQL Server Management Studio.
  • Finally add the physical directory <parent>\OdataSessionsBackend as https://localhost/OdataSessionsBackend to your IIS-installation.
  • For the Windows Phone demo app you need the Windows Phone developer tools installed.

Note that I’ve used the users test1 and test2 both having the password pass@word1 set in the membership-database. Also note that for streaming large files I required to modify the web.config of the backend to allow large uploads for the WCF binding and at the same time to allow large uploads for the web-runtime in the ASP.NET settings:

   <system.web>
 
      <httpRuntime maxRequestLength="10000000"/>  
    
    <roleManager enabled="true" />
    <authentication mode="Forms" />
    
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
  </system.web>
   <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
      <services><br>      <service name="OdataSessionsBackend.ManageSessionsService"><br>        <endpoint binding="webHttpBinding"<br>                  bindingConfiguration="ManageSessionServiceBinding"<br>                  contract="System.Data.Services.IRequestHandler" /><br>      </service>  
    </services>
    <bindings>
        <webHttpBinding><br>        <binding name="ManageSessionServiceBinding"<br>                 maxReceivedMessageSize="500000000"<br>                 maxBufferSize="500000000" <br>                 transferMode="Streamed"><br>        </binding><br>      </webHttpBinding>  
    </bindings>
  </system.serviceModel>

Feel free to get in touch with me if you have any further questionsWinking smile