11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 4 ■ INSTALLING AND CREATING WCF SERVICES 111ramrameshreddy.blog.comThe implementation now provides a clear contract definition, void of implementationdetails, that is attributed as required to provide the automatic generation of the metadata(either WSDL or MEX). This separation, in the same source file, can appear elsewhere. How thecontract is implemented, and ultimately bound, is managed through a configuration file orprogrammatically. For this example, and probably what is destined to be the norm, we do itvia configuration.In the Web.config file for the WCF service, shown in Listing 4-6, the mapping betweenthe type and the contract takes place through the element inside the section. Note the clear contract mapping to the implementation type, which isthe interface definition.Listing 4-6. Web.configIf you launch this service in the ASP.NET development server, you’ll see something differentfrom Figure 4-2 because the URL will differ by the IP port in use for the project. TheASP.NET development server dynamically chooses the IP port, unless you’ve overridden it. Ifyou’re using IIS, then the default port 80 is left off, and the URL appears as in Figure 4-2.ramrameshreddyramrameshreddy

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!