October book review: Essential WCF

Steve Resnick, Richard Crane, Chris Bowen
Essential Windows Communication Foundation. For .NET Framework 3.5.

This is a well-organized and easy-to-read introductory book on WCF. It provides a thorough overview of the principles behind building and consuming WCF web services and includes real-world examples illustrating how to leverage WCF framework in your applications. The topics covered in this book include:

  • Contracts: how to define complex structures and interfaces
  • Channels: how to configure channels and channel stacks
  • Bindings: how to choose communication protocols
  • Behaviors: how to manage instances, concurrency, and transactions as well as how to add your own custom behaviors
  • Serialization and Encoding: how .NET classes are serialized and represented on the wire
  • Hosting services in IIS, WAS, and managed .NET applications
  • Security options for authentication and transport- and message-level security for Internet and Intranet applications
  • Integration with other frameworks such as WF and Silverlight
  • Other topics: JSON, RSS/ATOM, peer networking, metadata publishing, diagnostics, and others
    • The authors did an excellent job explaining complex WCF concepts in simple terms and will help you jump right into building distributed applications in .NET. I highly recommend this book to .NET application developers and architects.

      Happy reading!

How to call MapPath in WCF services

While working with WCF services hosted in IIS7 with non-HTTP endpoints (such as TCP or NamedPipes), we realized that our usual way to resolve a phisycal file path corresponding to a virtual path on the web server is not supported.

In ASP.NET, we use HttpContext.Current.Server.MapPath method, but HttpContext.Current is null in WCF services with non-HTTP endpoints. What shall we do? It turns out that there is another way to map a virtual path: using the HostingEnvironment class. See the example below.

public static string MapPath(string path)
{

    if (HttpContext.Current != null)

        return HttpContext.Current.Server.MapPath(path);

    return HostingEnvironment.MapPath(path);

}

Happy coding!

Dave West speaks at OTUG on Wed, Oct 14, 2009

Who: Dave West
What: The Death of Agile - Business Ecology - and the Future of Software Development
When: Wednesday, October 14, 2009
5:30 - 6:30 PM Social Hour
6:40 - 9:00 PM Presentation
Where: Owens Science Hall, room 150 (3M Auditorium), University of St. Thomas, St. Paul, MN
Cost: $20. Free to all UST students, staff, and faculty.

See more information at http://www.otug.org.

Flash cards for GOF design patterns

I came across flash cards with class diagrams of GOF design patterns. The flash cards were created by Jason McDonald and are available for free download on his blog.

Welcome to ModelBlog

Thank you for visiting ModelBlog. We hope the time you spend with us will be both entertaining and worth your while. Have fun!

Authors

Search

Archive

Tags