ASP.NET
  Home arrow ASP.NET arrow Page 3 - Developing Business Logic using the WCF Se...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Developing Business Logic using the WCF Service Library with VS2K8 and ASP.NET 3.5
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 10
    2007-10-03

    Table of Contents:
  • Developing Business Logic using the WCF Service Library with VS2K8 and ASP.NET 3.5
  • Understanding the WCF Service Library: Employee class
  • Understanding the WCF Service Library: the app.config file
  • Understanding the WCF Service host
  • Understanding the WCF Client: ASP.NET 3.5 web site

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Developing Business Logic using the WCF Service Library with VS2K8 and ASP.NET 3.5 - Understanding the WCF Service Library: the app.config file


    (Page 3 of 5 )

    Every WCF Service must be configured with several settings. Complicated deployments have complicated configurations. As this article assumes that the solution sits on a developer machine, the service model element in "app.config" is defined as follows:

    <system.serviceModel>

    <services>

    <service name="NorthwindBLLService.EmpService"
    behaviorConfiguration="NorthwindBLLService.EmpServiceBehavior">

    <host>

    <baseAddresses>

    <add baseAddress="http://localhost:8181/EmpService" />

    </baseAddresses>

    </host>

    <endpoint address="" binding="wsHttpBinding"
    contract="NorthwindBLLService.IEmpService" />

    <endpoint address="mex" binding="mexHttpBinding"
    contract="IMetadataExchange" />

    </service>

    </services>

    <behaviors>

    <serviceBehaviors>

    <behavior name="NorthwindBLLService.EmpServiceBehavior">

    <serviceMetadata httpGetEnabled="True"/>

    <serviceDebug includeExceptionDetailInFaults="True" />

    </behavior>

    </serviceBehaviors>

    </behaviors>

    </system.serviceModel>

    Make sure that the following is always true to give full details of errors raised during development:

    <serviceDebug includeExceptionDetailInFaults="True" />

    The service gets hosted using the following address:

    <add baseAddress="http://localhost:8181/EmpService" />

    The main endpoint for the above service is defined as follows:

    <endpoint address="" binding="wsHttpBinding"
    contract="NorthwindBLLService.IEmpService" />

    And finally, the service is named as follows:

    <service name="NorthwindBLLService.EmpService" behaviorConfiguration="NorthwindBLLService.EmpServiceBehavior">

    Depending upon the deployment/hosting requirements, the "app.config" needs to be modified appropriately. It varies greatly from intranet configurations to extranet or even Internet configurations. It could be completely different from the above if the hosting will be on IIS (Web Service) or WAS or Windows Service.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys,This is my third article in the series focusing on WCF development...
       · Do you differentiate at all between the service layer and the business layer. isnt...
       · Simply don't want to complicate the things at this moment. You will see several...
     

    ASP.NET ARTICLES

    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT