Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. WCF,3Tier

WCF,3Tier

Scheduled Pinned Locked Moved C#
databasewcfcsharpwpfbusiness
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 2321293
    wrote on last edited by
    #1

    hi, i successful to create my 3 tier with the WCF method.(3 tier in coding and physical structure) my project i divided into several layers. myWCF(host), myClient(GUI/exe), myClientBz(Business Logic), myDAL(Data Access Layer), myClientInterfaces(interface) Error, if call more than 1 host. My Business Logic will more than 1 class. And i intending to make interface to myDAL(data access layer) setup config file in myWCF and myClient Due to text limitation i only copy out the important part. myHost config file: due to "<,>" allow not allow there, i change to "()" (services) (service behaviorConfiguration="metadataBehavior" name="myClientBz.myMessager") (endpoint address="myMessagerService" binding="basicHttpBinding" bindingConfiguration="" name="basicHttp" contract="myClientInterfaces.imyMessager" /) (endpoint binding="mexHttpBinding" bindingConfiguration="" name="metadataExchange" contract="IMetadataExchange" /) (host) (baseAddresses) (add baseAddress="http://cspc/myMessager" /) (/baseAddresses) (/host) (/service) (/services) myClient config file (i created by running the host exe, same time add service references at myClient's reference) (client) (endpoint address="http://cspc/myMessager/myMessagerService" binding="basicHttpBinding" bindingConfiguration="basicHttp" contract="myMessagerService.imyMessager" name="basicHttp" /> (/client) Begin host: using (ServiceHost host = new ServiceHost(typeof(myMessager))) { host.Open(); Console.ReadLine(); host.Close(); } to test my exe are ok, i write form1 in myClient and test in other pc myMessagerService.imyMessager proxy = new myClient.myMessagerService.imyMessagerClient(); string result = proxy.SendMessage(); MessageBox.Show(result, "xx"); it work fine. it return me a message that i write in myClient If myClientBz required extra class, what needed in next? Required to add myCaculation, myInformation into myClientBz. Same i need to add interface for myCaculation, myInformation into myClientInterfaces right? My project going to Touch on SQL DataBase. which mean i required to add interface and config file(myDAL) again? or is depend how i write the coding that the way i communicate with my SQL DB? Please give advise or sample. by memeber 2321293 CSTan

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups