You must Sign In to post a response.
  • Category: Windows 8

    WCF or Web Service Interview question

    Following scenario was asked in the interview

    There is solution named as Soln1 and inside that solution there are 2 projects proj1 and proj2. Proj1 is WCF class library and there is a web method or WCF service inside that class library. Now in Proj2 how can we use that method.
  • #764944
    when you build 'proj1', (There is option in build menu in visual studio to build individual project) and then it will produce resultant DLL, then you can refer (using add service reference) that WCF dll in your project code.
    Make sure that all the dependent assemblies of Name.of.the.dll are also added to the WCF project
    see below link for more details

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #765003

    Call that particular service by passing the Service URL and add the reference to your project then using instance of the project you can able to call the method whatever you want.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #765013
    In your Solution there are two projects. The first project is the WCF. It has webmethod. So you can that as service.

    1. Open the second project
    2. Add the first project as service reference.

    So that you can access the webmethods of the first project from your second project

    By Nathan
    Direction is important than speed

  • #765046
    simply add service reference to your project and create an instance for that and then access your wherever you need in your project

  • Sign In to post your comments