locked
WCF library project or WCF Application project RRS feed

  • Question

  • User-1907931422 posted

    I have developed an asp.net mvc 4 project and it goes live in a commerical hosting server. Now I want to add a new feature to the existing project, which is an ajax call wcf service. Thus I have to create a new wcf project. My question is which one should I select? WCF library project or WCF Application project?

    Thursday, July 4, 2013 1:08 PM

Answers

  • User-183374066 posted

    I already published the existing project to the hosting. If according to your suggesting which is from WCF Application Project, should I publish WCF again but different url?

    I hope you are using webHttpBinding. You can access your service.

    do I need add web reference to the existing project

    You need to "Add services reference" to consume web service

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 4, 2013 2:32 PM

All replies

  • User-183374066 posted

    First read differences between them.

    A service application includes a website host already setup for you. A service library is a library of services that a host can reference and startup.

    If you start with a service library (recommended) you can then choose any host you wish (a windows service, IIS/ASP.NET, or even a console application) and you'd just reference your library from your new host. Choosing a Service Application limits your host to just IIS/ASP.NET (though this might be ok for your purposes, but will limit the protocols you can use).

    In your case i would suggest you directly start from WCF Application Project and do rapid developement .. You can use old ASMX web services techniques too.

    Regards.

    Thursday, July 4, 2013 1:33 PM
  • User-1907931422 posted

    Nasser Malik

    In your case i would suggest you directly start from WCF Application Project and do rapid developement .. You can use old ASMX web services techniques too.

    I already published the existing project to the hosting. If according to your suggesting which is from WCF Application Project, should I publish WCF again but different url?

    Also, do I need add web reference to the existing project or just ignore this step and interact with web service directly?

    Thursday, July 4, 2013 2:11 PM
  • User-183374066 posted

    I already published the existing project to the hosting. If according to your suggesting which is from WCF Application Project, should I publish WCF again but different url?

    I hope you are using webHttpBinding. You can access your service.

    do I need add web reference to the existing project

    You need to "Add services reference" to consume web service

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 4, 2013 2:32 PM