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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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 / 11
    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...
       · Hi,You have not described the steps of adding WCF service to asp.net, how you will...
       · Great article and, refreshingly, in VB.Net too. Thank you very much.
     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek