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
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Web Services implementing interfaces

Web Services implementing interfaces

Scheduled Pinned Locked Moved .NET (Core and Framework)
databaseasp-netsql-serverwcfdesign
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.
  • G Offline
    G Offline
    Guy Harwood
    wrote on last edited by
    #1

    Hi, here is my scenario... i have the following in my solution... App1 - normal application App2 - normal application CoreApp - library containing classes and 'core' functionality App1 and App2 talk to each other via their sql server databases. now, sometimes app1 and app2 may be installed on the same server, sometimes they are not. so, if they are installed on the same box there will be a connection string to the other apps db in their web.config file. if the connection string does not exist then i must call the other apps web service which will perform the db insert for me. i made an interface, lets says its called IComms it defines the method signature that allows app1 to put something in app2s database. so to send a message i write this code in App2.. dim proxy as IComms 'see if we have connection string for app1 database if getConfigSetting("App1ConnectionString").length = 0 then 'use web service proxy = new app1.webservice else proxy = new CoreApp.dbCalls end if proxy.sendmessageToApp1("hello") this is all very well, but the reference to app1s web service in app2 does not create an implementation of the interface on the proxy class. is there any way round this or should i just design the app without the use of an interface? :~

    ---Guy H (;-)---

    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