Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Visual Studio 2013 and .NET 4.5 Expert Cookbook
Visual Studio 2013 and .NET 4.5 Expert Cookbook

Visual Studio 2013 and .NET 4.5 Expert Cookbook: Over 30 recipes to successfully mix the powerful capabilities of Visual Studio 2013 with .NET 4.5

eBook
$9.99 $36.99
Paperback
$60.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Chapter 2. Enhancements to WCF 4.5

In this chapter, we will cover the following recipes:

  • Understanding Windows Communication Foundation (WCF) by creating a basic application
  • Hosting a WCF service in different hosting environments
  • Streaming data over a network using a WCF service
  • Writing a REST-based WCF service
  • Creating a WCF service using the Open Data Protocol standards
  • Extending a WCF service (service extensibility)

Introduction

In today's world, enterprise applications are the key to any enterprise. We are in the age of devices. People use one or multiple devices to be connected with the external world. Business processes need shared services, which can be consumed by these devices. Basically, an application can either consume data directly from the database tier or use loosely coupling models and get data from a hosted service. Most enterprises prefer to have a loose coupling on data so that their apps are maintained and also to sustain a clear separation of the application and business logic. Most of the big giants expose their data using standard compliant web-based services and the clients use them to consume data. Some of the services are also hosted behind the secure socket layer and require a secure encrypted connection between the host and the client to perform a data transfer.

Modern enterprises rely on standardized data points so heavily that many of them are now sharing public content...

Understanding Windows Communication Foundation (WCF) by creating a basic application

WCF is easy and simple. A large number of APIs are built inside .NET, which provides an easy way to implement a WCF service. Visual Studio provides the appropriate tools to create proxy classes automatically when a service reference is taken into a project such that the user only needs to configure the service with a proper endpoint address and the service will start working. In this recipe, we are going to look at the internal details and the API that you need to consider to create and connect services. We are not going to use the tools of Visual Studio to build this service. We will later explain how to make use of Visual Studio to quickly create services in other recipes.

Getting ready

Building a service with Visual Studio is very easy and automatic but if we consider not using it, we will have to manually perform a lot of plumbing to ensure that everything works correctly. We will use a class library...

Hosting a WCF service in different hosting environments

Hosting a service is an important part of any service. Coming from web services, WCF exposes more relevant APIs to handle different kinds of hosting environments. A WCF service can be hosted virtually anywhere, starting from a simple Console Application, a Windows Service, IIS, or even other hosting services such as Windows Activation Service. After the service is hosted on an environment, the service endpoint for a particular service gets exposed. When the host process runs, WCF will be available using the configured endpoints.

Hosting a WCF service in different hosting environments

Any .NET application runs using a Windows process. Inside a process, you can host multiple .NET application domains. Each application domain logically separates the execution environment from another. WCF requires ServiceHost to host a worker process inside the application domain. Similarly, each application domain can host multiple worker processes. Each application represents service host-to-host multiple...

Streaming data over a network using a WCF service

WCF is an easy way to implement a distributed application and also provides built-in functions to handle complex problems. Streaming is one of the most important problems we always need to consider while working over a network in distributed applications. Applications deployed over a cloud sometimes need download or upload capabilities. Downloading a large file over a network using a buffered read technique such as a SOAP-based response can really be a bottleneck to the system. Reading a very large file from the memory can terminate the server process with OutofMemoryException.

WCF allows you to send byte streams through the communication channel, or even allows you to implement a service that might take the stream start location from the service call and send the stream from a certain location. It allows you to use normal HttpBinding to support streams that have download or upload capabilities in the connected client-server architecture...

Introduction


In today's world, enterprise applications are the key to any enterprise. We are in the age of devices. People use one or multiple devices to be connected with the external world. Business processes need shared services, which can be consumed by these devices. Basically, an application can either consume data directly from the database tier or use loosely coupling models and get data from a hosted service. Most enterprises prefer to have a loose coupling on data so that their apps are maintained and also to sustain a clear separation of the application and business logic. Most of the big giants expose their data using standard compliant web-based services and the clients use them to consume data. Some of the services are also hosted behind the secure socket layer and require a secure encrypted connection between the host and the client to perform a data transfer.

Modern enterprises rely on standardized data points so heavily that many of them are now sharing public content through...

Understanding Windows Communication Foundation (WCF) by creating a basic application


WCF is easy and simple. A large number of APIs are built inside .NET, which provides an easy way to implement a WCF service. Visual Studio provides the appropriate tools to create proxy classes automatically when a service reference is taken into a project such that the user only needs to configure the service with a proper endpoint address and the service will start working. In this recipe, we are going to look at the internal details and the API that you need to consider to create and connect services. We are not going to use the tools of Visual Studio to build this service. We will later explain how to make use of Visual Studio to quickly create services in other recipes.

Getting ready

Building a service with Visual Studio is very easy and automatic but if we consider not using it, we will have to manually perform a lot of plumbing to ensure that everything works correctly. We will use a class library to...

Hosting a WCF service in different hosting environments


Hosting a service is an important part of any service. Coming from web services, WCF exposes more relevant APIs to handle different kinds of hosting environments. A WCF service can be hosted virtually anywhere, starting from a simple Console Application, a Windows Service, IIS, or even other hosting services such as Windows Activation Service. After the service is hosted on an environment, the service endpoint for a particular service gets exposed. When the host process runs, WCF will be available using the configured endpoints.

Any .NET application runs using a Windows process. Inside a process, you can host multiple .NET application domains. Each application domain logically separates the execution environment from another. WCF requires ServiceHost to host a worker process inside the application domain. Similarly, each application domain can host multiple worker processes. Each application represents service host-to-host multiple endpoints...

Left arrow icon Right arrow icon

Description

If you are a Visual Studio 2013 or .NET developer who would like to sharpen your existing skill set and adapt to new .NET technologies, this is the book for you. A basic understanding of .NET and C# is required.

What you will learn

  • Get to grips with Visual Studio 2013 IDE and its various components utilizing its tools to debug your code better Understand the Windows Phone 8 development environment and gain practical experience on app development on the platform Create service-oriented applications using WCF and study advanced use cases on implementing a RESTful service with WCF Test your application inside Visual Studio 2013 IDE and advanced use case scenarios to handle testing issues Effectively utilize the various components of Team Foundation Server for better management of code Extend Visual Studio 2013 IDE to add your own custom changes enhancing your experience Discover the advanced usage of cloud computing with Windows Azure and its various components

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 25, 2014
Length: 308 pages
Edition : 1st
Language : English
ISBN-13 : 9781849689731
Vendor :
Microsoft
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Sep 25, 2014
Length: 308 pages
Edition : 1st
Language : English
ISBN-13 : 9781849689731
Vendor :
Microsoft
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 109.98
Visual Studio 2013 and .NET 4.5 Expert Cookbook
$60.99
Visual Studio 2013 Cookbook
$48.99
Total $ 109.98 Stars icon
Banner background image

Table of Contents

8 Chapters
1. A Guide to Debugging with Visual Studio Chevron down icon Chevron up icon
2. Enhancements to WCF 4.5 Chevron down icon Chevron up icon
3. Building a Touch-sensitive Device Application Using Windows Phone 8 Chevron down icon Chevron up icon
4. Working with Team Foundation Server Chevron down icon Chevron up icon
5. Testing Applications Using Visual Studio 2013 Chevron down icon Chevron up icon
6. Extending the Visual Studio IDE Chevron down icon Chevron up icon
7. Understanding Cloud Computing with Windows Azure Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(3 Ratings)
5 star 33.3%
4 star 66.7%
3 star 0%
2 star 0%
1 star 0%
robert switzer May 30, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Dies ist ein äußerst nützliches Buch für jeden Entwickler, der sich sehr intensiv mit .NET befassen muss. Hier habe ich viele hilfreiche Tipps gefunden, die mir bei der Entwicklung mit Visual Studio weitergebracht haben. Und was mich am meisten erfreut, ist die Tatsache, dass ich die Entwicklung von verteilten Services mit WCF als hoffnungslos kompliziert und beinahe unmöglich fast aufgegeben habe. Aber dieses Buch hat mir geholfen, erste funktionierenden verteilten Services mit WCF zum Laufen zu bringen. Dies ist ungefähr das 5. Buch mit dessen Hilfe ich dies versucht habe.Die Art, wie Sur seine 'Rezepte' gestaltet, ist sehr leicht nachzuvollziehen. Ich kann dieses Buch uneingeschränkt für jeden empfehlen, der komplexe Anwendungen mit Visual Studio und .NET entwickeln soll.
Amazon Verified review Amazon
Rene Rendon Jr Jun 05, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Full disclosure first, I did receive a review copy. That being said I found good and bad things about this book. While it does say cookbook do not expect 20 to 30 recipes per chapter. The book covers three to four topics per subject in the chapter. You get some general topics like WCF, Windows Phone, Debugging, Extending Studio, Testing, and Azure. Windows Phone is constantly changing so while useful, sometimes the platform is in flux. You do get a step by step per topic or recipe. I could follow them but at times the author skipped a slight step or two like what did he name the project. You need to refer to the source code to get some of these steps. A true step by step includes everything but to keep the book smaller I think some of it is not there. Again refer to the source code. I will also point out this is not a book for beginners now it will serve well as introduction to some of these topics mentioned and you go get some examples. A chapter on TFS is included but you need access to TFS server. I worked with the Visual Studio online and I could follow some of it. I also have some familiarity with it as I use it for work but sometimes you need to reread the topics again. One excellent thing the author did was provide links on every topic where you could read for further clarification. More authors should do this.ProsBroad coverage of range of topicsStep by step coding examplesLinks at end of topics for further coverageCons depending on your point of viewMay seem too general. It gives you stuff to start and some different coverage but still may need more to understandSamples step by steps may miss small steps like names of projectsNot for beginners (not a con per se as this is a cookbook not a beginner book)Technology is subject to change (Azure, Windows Phone)I found new stuff in the testing and debugging and T4 templates. You should find something useful in this book.
Amazon Verified review Amazon
jammesm Jun 04, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This book is a "must-have" as an introduction of the Visual Studio 2013. It helps to learn the various components and technologies of .NET development with Visual Studio 2013 . Clear examples to learn the technologies. More over, many wise advices that any developer should know.The books should bring you clear vision on this development tools and the .NET technologies . I hope you will appreciate it as i did.I recommended it greatly !!!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.