2

I am currently doing up gradation of existing asp.net application to MVC 4 application. In the exsting application there is an asmx file in the solution implementing web service for registration purpose. Now in my MVC application I need to implement this service in terms of WCF contracts. As per my knowledge To implement WCF contract & consume it one need to have 2 separate projects. First implementing WCF contracts & another for consuming it in actual application. So now I want to know that how should I replace my web service i.e. asmx file in MVC application by WCF service. Thanks in advance..

Yuck
  • 49,664
  • 13
  • 105
  • 135
Shaggy
  • 315
  • 2
  • 9
  • 23
  • possible duplicate of [How much effort is required to convert an ASMX to WCF web service?](http://stackoverflow.com/questions/1502298/how-much-effort-is-required-to-convert-an-asmx-to-wcf-web-service) – Yuck Oct 28 '13 at 13:02
  • 1
    And http://stackoverflow.com/questions/1030456/converting-asmx-to-wcf-web-service and http://msdn.microsoft.com/en-us/library/aa738697.aspx and http://social.msdn.microsoft.com/Forums/vstudio/en-US/975e3b58-8d60-4011-aecb-2ba34d10c3fc/asmx-to-wcf-conversion?forum=wcf ..... – Yuck Oct 28 '13 at 13:02
  • @Yuck Hi, Till date I have just practiced WCF with 2 separate demo projects 1 for implementing service contracts & another (like console application) for consuming it. I want to add WCF service to my MVC project which is going to consume this service; likewise in the old application asmx file is within the project which is calling its web methods. Is it possible? – Shaggy Oct 28 '13 at 13:28

1 Answers1

1

Create a new WCF service in your solution from Visual Studio, it will create all the bindings and end points so you can easily host it on IIS. Convert all the web methods to service contracts. It should be simple task once you have the service.

You might find this helpful!

Poornima
  • 918
  • 5
  • 11