TopXML : How can WCF support multiple IIS Binding specified per site in WCF

 

IIS supports specifying multiple IIS bindings per site, which results in multiple base addresses per scheme. A WCF service hosted under a site allows binding to only one baseAddress per scheme.

So if you get an error like this “This collection already contains an address with scheme http wcf”, you may want to look at the following:

Solution in .Net Fx 3.0:Supporting Multiple IIS Bindings Per Site

Solution in .Net Fx3.5: BaseAddressPrefixFilters

<system.serviceModel>

<serviceHostingEnvironment>

<baseAddressPrefixFilters>

        <add prefix=”http://shipping.myorg.com”/>

</baseAddressPrefixFilters>

</serviceHostingEnvironment>

</system.serviceModel>

Via TopXML : How can WCF support multiple IIS Binding specified per site in WSCF/WCF

Programming the Web using WCF 3.5 – ‘Web HTTP Programming Model’

Publishing RSS and ATOM Feeds using WCF 3.5 Syndication Libraries:

Windows Communication Foundation with its 3.5 release provides several new and useful features including capability to publish and consume syndication feeds in a much easier and uniform way, right out of the box. This article focuses on using the WCF 3.5 libraries namely System.ServiceModel.Syndication namespace to create and publish an RSS and Atom feed from the same code base. System.ServiceModel.Syndication provides a framework to perform the syndication leg-work for us including serialization and deserialization of web feeds.

image

HTTP Programming with WCF and the .NET Framework 3.5:

WCF in the .NET Framework 3.5 includes an easy-to-use HTTP programming model, JavaScript Object Notation (JSON) messaging capabilities, and a new syndication API that makes it easy to create and consume syndicated content. With this feature set, WCF is now the service platform of choice for connecting services to Web clients, whether they are ASP.NET AJAX controls, SilverlightTMclients, or even browsers. These features also work in partial trust scenarios (like ASP.NET medium trust) so you can host WCF services in widely available hosting environments. To round it all out, there’s also new tooling integrated into Visual Studio®2008 that dramatically reduces the amount of time it takes to get a service up and running.

This means you can build a service that communicates within or across enterprise boundaries using SOAP and WS-*, and you can configure that same service to communicate externally using the protocols of the Web – JSON, RSS & ATOM. 

It starts with a level-setting discussion about some of the important architectural principles in HTTP and the Web, then moves to the new HTTP programming model in WCF, and, finally, to the new syndication API.

  • HTTP message basics
  • Adding information to URIs
  • WCF and HTTP
  • RSS and ATOM with WCF
  •  image

    image

    Use LINQ and .NET 3.5 to Convert RSS to JSON using DataContractJsonSerializer and HttpHandler

    JavaScriptSerializer is marked as obsolete with a note to use the DataContractJsonSerializer instead.  Here is what a generic HTTP Handler would look like that mashes up these techniques using .NET 3.5.

    image

    Creating a JSON Service with WCF 3.5, DataContractJsonSerializer and WebGetAttribute

    image

    image

    Create RSS and Atom Feeds with LINQ and WCF Syndication in .NET 3.5 within ASPX

    image

    …..

    image

    Also directly from MSDN – WCF 3.5 Feature List

    image

    Web Programming Model
    http://msdn2.microsoft.com/en-us/library/bb412169.aspx

    Web Programming Model Samples
    http://msdn2.microsoft.com/en-us/library/bb472415.aspx

    WCF Syndication
    http://msdn2.microsoft.com/en-us/library/bb412202.aspx

    Syndication Samples
    http://msdn2.microsoft.com/en-us/library/bb943474.aspx

    LINQ to SQL vs LINQ to Entities

     

    When Do I Use LINQ to SQL?

    The primary scenario for using LINQ to SQL is when building applications with a rapid development cycle and a simple one-to-one object to relational mapping against the Microsoft SQL Server family of databases. In other words, when building an application whose object model is structured very similarly to the existing database structure, or when a database for the application does not yet exist and there is no predisposition against creating a database schema that mirrors the object model; you can use LINQ to SQL to map a subset of tables directly to classes, with the required columns from each table represented as properties on the corresponding class. Usually in these scenarios, the database has not and/or will not be heavily normalized.

    image

    When do I use LINQ to Entities?

    The primary scenario targeted by LINQ to Entities is a flexible and more complex mapping scenario, often seen in the enterprise, where the application is accessing data stored in Microsoft SQL Server or other-third party databases.

    In other words, the database in these scenarios contains a physical data structure that could be significantly different from what you expect your object model to look like. Often in these scenarios, the database is not owned or controlled by the application developer(s), but rather owned by a DBA or other third party, possibly preventing application developers from making any changes to the database and requiring them to adapt quickly to database changes that they may not have been aware of.

    image

    Via Introducing LINQ to Relational Data

    Building a ToJSON() Extension Method using .NET 3.5

    Here…Serialize a List<Person> into a string of JSON format

    image

    Here is the Extension method to provide the JSON serialization on the String Type.

    image

    Note: In addition to the JavaScriptSerializer class, .NET 3.5 also now includes a new System.Runtime.Serialization.DataContractJsonSerializer class that you can use for JSON serialization/deserialization

    Via Tip/Trick: Building a ToJSON() Extension Method using .NET 3.5 – ScottGu’s Blog

    Matt Berseth: Creating an Outlook Navigation Bar using the ListView and Accordion AjaxControlToolkit Control

     

    image

    The left pane contains a 2 level hierarchy of categories and subcategories.  As the user selects different subcategories the designer wants the right pane’s content to be updated with the corresponding information.  Just like Outlook, the designer wants the subcategories to be displayed within expanding and collapsing panels. Accordion AjaxControlToolkit.

    The Accordion is not the only toolkit control that allows you to provide multiple panes of content and display them one at a time, the Tab control does this as well.  The trick is deciding what control better meets your requirements.

    Live Demo (IE6, IE7 and FF) | Download (.Net 3.5 and Toolkit Version 3.5.11119.0)

    Via Matt Berseth: Creating an Outlook Navigation Bar using the ListView and Accordion Controls

    Google Contacts Data API – programmatic access your Google Contact list

     

    We’re happy to announce the availability of our Google Contacts Data API that gives programmatic access to your contact list. The contact list is shared among Google applications like Gmail, Reader, Calendar, and more.
    The Google Contacts Data API allows you to own your own contact data. We expect the API to be useful for a big range of applications. For example, developers can use it to:

    • Import a user’s Google contacts into their web or desktop application
    • Export their application’s contact list to Google
    • Write sync applications for mobile devices or popular, desktop-based contact management applications

    The Contacts API allows developers to create, read, update, and delete contacts using the Google Data protocol, based on AtomPub.

    Via Official Google Data APIs Blog: 3. 2. 1. Contact. The API has landed

    CAPTCHA

    Completely Automated Public Turing test to tell Computers and Humans Apart”

    Is a type of challenge-response test used in computing to determine whether the user is human.

    CAPTCHAs can be deployed to protect systems vulnerable to e-mail spam. CAPTCHAs have also found active use in stopping automated posting to blogs, forums and wikis. CAPTCHAs also serve an important function in rate limiting, as automated usage of a service might be desirable until such usage is done in excess, and to the detriment of human users. In such a case, a CAPTCHA can enforce automated usage policies as set by the administrator when certain usage metrics exceed a given threshold.

    image