Tag Archives: WCF

Integrating with systems behind a firewall from CRM Online using Windows Azure Service Bus Relay

The Windows Azure Service Bus Relay enables applications hosted anywhere with an internet connection to securely call back to applications hosted in your own datacenter behind a firewall.  The CRM 2011 SDK offers documentation on how to use the Windows Azure Service Bus Relay from CRM Online.  Here’s a link to the documentation that describes the scenario:

http://dkdt.me/HOzzrr

The video below demonstrates a working example of the end to end scenario and walks you through the configuration.

http://dkdt.me/HOzy6X 

NOTE: The video shows my WCF service running in a console application for simplicity.  Many will want to host their services in IIS.  See IIS hosting of Wcf Services with Servicebus Endpoints for more details.

@devkeydet

PubSec Dev Dinner on External Data and Services with SharePoint 2010

My old team is having a developer dinner tomorrow night titled Developing SharePoint 2010 Solutions Using External Data and Services.  See here for more details at http://bit.ly/kPUq5n.

“…

What you will learn

SharePoint 2010 allows developers to work with both internal and external data using Business Connectivity Services (BCS), Excel Services, Access Services and custom WCF services. During the presentation we will discuss and demonstrate several common usage scenarios.

  • Bringing SQL Server data to SharePoint using BCS
  • Sharing Excel Data using PowerPivot for SharePoint
  • Publishing Access Database applications to SharePoint
  • Sharing secure data using BCS and the secure store service
  • Creating Silverlight Using WCF RIA services for SharePoint

…”

Help make Microsoft developer technologies better!

Follow devkeydet on Twitter

Ron Jacobs just blogged about how .NET developers can provide feature feedback and vote on WCF/WF features.

http://blogs.msdn.com/b/rjacobs/archive/2011/04/14/how-you-can-make-wf-wcf-better.aspx

Many Microsoft product teams are doing this nowadays. It still surprises me how many .NET developers don’t realize these feature voting sites exist. In addition to WF/WCF, I am aware of these:

http://wpdev.uservoice.com/forums/110705-app-platform

https://windowsphone7community.uservoice.com/forums/84435-feature-feedback

http://data.uservoice.com/forums/72027-wcf-data-services-feature-suggestions

http://data.uservoice.com/forums/72025-ado-net-entity-framework-ef-feature-suggestions

http://dotnet.uservoice.com/forums/40583-wpf-feature-suggestions

http://dotnet.uservoice.com/forums/4325-silverlight-feature-suggestions

http://dotnet.uservoice.com/forums/87171-visual-basic-content-requests

http://dotnet.uservoice.com/forums/57026-wcf-ria-services

http://www.mygreatwindowsazureidea.com/pages/34192-windows-azure-feature-voting

http://www.mygreatwindowsazureidea.com/forums/35889-microsoft-codename-dallas-feature-voting

http://www.mygreatwindowsazureidea.com/forums/44459-sql-azure-data-sync-feature-voting

http://www.mygreatwindowsazureidea.com/forums/34685-sql-azure-feature-voting

http://www.mygreatwindowsazureidea.com/forums/100417-sql-azure-reporting-feature-voting

http://www.mygreatwindowsazureidea.com/forums/40626-windows-azure-appfabric-feature-voting

http://www.mygreatwindowsazureidea.com/forums/103009-windows-azure-code-samples-voting

http://www.mygreatwindowsazureidea.com/forums/103403-windows-azure-content-voting

http://aspnet.uservoice.com/forums/41199-general

http://aspnet.uservoice.com/forums/41201-asp-net-mvc

http://aspnet.uservoice.com/forums/41202-asp-net-webforms

http://aspnet.uservoice.com/forums/50615-orchard

http://aspnet.uservoice.com/forums/100405-performance

http://aspnet.uservoice.com/forums/41233-visual-studio-performance-feedback

Let me know in the comments if I’ve missed any.  I’ll add them.

OQuery – A fluent API to build OData url queries sans LINQ

Yesterday, I blogged about a solution to compose OData / WCF Data Service queries using LINQ for situations where LINQ enabled client libraries don’t exist (i.e. JavaScript and Windows Phone 7).

http://blogs.msdn.com/b/devkeydet/archive/2011/02/02/data-services-odata-client-for-windows-phone-7-and-linq.aspx

The post is all about using LINQPad as a tool to write your LINQ queries, then using the feature in LINQPad that gives you the url query translation.  Well today, a new MSDN Code Callery project just popped up called OQuery that offers another approach that doesn’t require using an external tool such as LINQPad:

http://code.msdn.microsoft.com/oquery

Here’s the description from the project page:

“OQuery is a library which gives you a fluent style interface for building OData Url Fragments in javascript or C#.
Neither Javascript or Silverlight for WP7 support LINQ and so this library in those cases.”

What are you waiting for?  Go check it out!

Follow devkeydet on Twitter

Data Services (OData) Client for Windows Phone 7 and LINQ

 

The WCF Data Services Team released a client library to make it easier to interact with OData services from Windows Phone 7. 

http://bit.ly/wp7odatalib

The major caveat (and bummer) with the library is that “LINQ support in the client library has been removed as the core support is not yet available on the phone platform.”  I have a tip/trick for LINQ lovers like me that will allow you to still use LINQ query syntax to compose your query (kind/sorta).  A tool I find useful to when writing OData queries on Windows Phone 7 is LINQPad.  I use the tool to write LINQ queries against my data service, then get the url syntax query translated for me:

clip_image002

Once I get my LINQ query right, I just paste the http string into my app.  I’m still surprised about how many people aren’t aware of LINQPad.  You must check it out if you use LINQ in your day to day coding (which I am sure most of you do now).  You can learn more about using LINQPad against OData services (amongst many other uses) from the product site:

http://www.linqpad.net/

NOTE: This tip/trick is very useful when querying OData services from JavaScript as well.  Here are two helpful posts on using jQuery to interact with an OData service:

http://stephenwalther.com/blog/archive/2010/04/01/netflix-jquery-jsonp-and-odata.aspx

http://stephenwalther.com/blog/archive/2010/03/30/using-jquery-and-odata-to-insert-a-database-record.aspx

Hope this helps save you some time!

Follow devkeydet on Twitter

Entity Framework N-Tier

digg_url = “http://blogs.msdn.com/devkeydet/archive/2010/04/22/entity-framework-n-tier.aspx”;digg_title = “Entity Framework N-Tier”;digg_bgcolor = “#555555”;digg_skin = “normal”;http://digg.com/tools/diggthis.jsdigg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;

This is a topic I have customer conversations about quite often.  I just found my latest “watch this, then let’s talk about it” reference.  Tony Sneed just published a webinar about the topic.  Definitely worth watching if you are interested in this scenario.

http://blog.tonysneed.com/2010/04/21/webinar-n-tier-entity-framework-with-dtos/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+DevelopmentorInstructors+(Developmentor+Instructor’s+Aggregated+Feed)&utm_content=Google+Reader

Consuming REST services using HttpClient

digg_url = “http://blogs.msdn.com/devkeydet/archive/2010/02/08/consuming-rest-services-using-httpclient.aspx”;digg_title = “Consuming REST services using HttpClient”;digg_bgcolor = “#555555”;digg_skin = “normal”;http://digg.com/tools/diggthis.jsdigg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;

If you have a need to consume REST Services from .NET Framework based code, then you should really have look at the WCF Rest Starter Kit.  There is a handy class called HttpClient that is, in my opinion, provides the best / cleanest way to consume REST services at the http level.  Essentially, it gives you the ability to make http calls as easy as:

image

There is so much more to HttpClient than the little snippet above, including ways to easily hydrate / deserialize the response of the REST service into a .NET types.  You have quite a bit of power / control over the common REST service consumption scenarios.  There’s a nice little blog post over at The .NET Endpoint blog which covers HttpClient.  The BEST starting point, again my opinion, for learning about HttpClient is these two Ch. 9 screencasts by Aaron Skonnard:

https://channel9.msdn.com/shows/Endpoint/endpointtv-Screencast-Consuming-REST-services-with-HttpClient/

https://channel9.msdn.com/shows/Endpoint/endpointtv-Screencast-Processing-Message-Content-using-HttpClient-class/

Once you’ve watched the screencasts and read the blog post, then you will probably want to learn a bit more about the WCF REST Starter Kit.  Here’s a great overview of the kit (also by Aaron Skonnard):

http://msdn.microsoft.com/en-us/library/ee391967.aspx

Bing Maps roadshow in Reston

Want to get up to speed on the latest release of Bing Maps including both the Ajax and Silverlight controls as well as the SOAP web services?  Don’t miss the upcoming roadshow in Reston, Va.  Details:

http://www.bing.com/community/blogs/govmaps/archive/2009/11/24/bing-maps-roadshow-coming-to-reston-virgina.aspx

“At this event, experts will provide an overview of Bing Maps as a powerful visualization tool for geographic and location-based information. With highlights of scenarios such as locators, fleet/asset tracking, data visualization portals, and location intelligence, we’ll present a deep dive into the Bing Maps Platform, including details on specific features, AJAX, Web Services, and new Silverlight APIs.

We’ll also review exciting recent enhancements, exploring ways to integrate with GIS systems and leverage SQL 2008 spatial features, as well as other related tools and technologies.  When you meet the experts, you’ll learn solution implementation and best practices―and you’ll leave with the tools and resources to tap the power of location using Bing Maps.

Event Summary:
1:00 – 2:15  Introduction to Bing Maps, Solution Overview, and Demos
2:30 – 3:30 Deep Dive on Architecture and APIs
3:45 – 5:00 Best Practices, Data Integration, and Future of Bing Maps”

DevDinnerOnDemand: Overview of the .NET Framework 3.5 SP1

digg_url = “http://blogs.msdn.com/devkeydet/archive/2008/11/10/devdinnerondemand-overview-of-the-net-framework-3-5-sp1.aspx”;digg_title = “DevDinnerOnDemand: Overview of the .NET Framework 3.5 SP1”;digg_bgcolor = “#555555”;digg_skin = “normal”;http://digg.com/tools/diggthis.jsdigg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;

With the .NET Framework 3.5 (the version native to Visual Studio 2008) coming up on its first anniversary, Microsoft is poised to release the first update to the framework in the form of Service Pack (SP1).  This Service Pack is unlike your standard Service Pack, in that it will introduce new features/capabilities to the .NET Framework.  Some of these features where originally planned to be in the initial release of the framework and others are features/capabilities added to enhance or further secure the core .NET Framework.  The August Developer Dinner is going to focus on some of the new features as well as a few of the new enhancements, to give you an introduction of the improved capabilities of the Microsoft Developer Platform.

What you will learn:

This evenings presentation will be a running stream of demonstration focusing on new features and functionality coming in the new Service Pack for several of the key areas of .NET Development today, including Web Development (ASP.NET), Database Development (ADO.NET), Web Services/SOA (Windows Communication Foundation) and User Experience (Windows Presentation Foundation).

You will see demonstrations that will include:

  • Making data access easier with the ADO.NET Entity Framework.
  • Exposing your data access layer using ADO.NET Data Services
  • Building “Data Entry” Web-based applications faster than ever using ASP.NET Dynamic Data.
  • Making AJAX Applications faster with script combining and easier with built in support for handling browser history (i.e. back/forward buttons).
  • How to achieve up to 40% faster startup performance for your WPF applications and further improve the startup experience using a splash screen.
  • Reducing the time it takes to deploy your WPF applications using the New .NET Framework Client Profile.
  • Build services faster using enhancements in WCF.

View Recording:

https://channel9.msdn.com/posts/keydet/US-Public-Sector-Developer-Dinner-for-Partners-NET-Framework-35-SP1/

The follow up post for this developer dinner is http://blogs.msdn.com/devkeydet/archive/2008/08/21/follow-up-developer-dinner-on-net-framework-3-5-sp1.aspx.