tags:

views:

930

answers:

2

I have 2 web services with about 6 web methods in total, most of the code is ofc sitting in assemblies any way, and the web service asmx is really just calling these assembly methods and returning their return type.

How much effort is it to convert the web services from ASMX to WCF?

I pretty much at this stage control the only - non web based clients connecting to the web services, so this is not really a problem, product is in prelaunch.

+3  A: 

You should find it extremely simple to convert - especially if your existing asmx web methods are just calling into other classes. Just create a new WCF Service from Visual Studio - that way you still have your existing web services intact. It will automatically create an http end-point for your so you can just dump it straight into IIS (with a little configuration). You will need to describe your DataContract classes but that it trivially simple too.

I did this recently and it was a joy!

Chris Arnold
Having actually done it - I wouldn't call the overall effort extremely easy. But I am glad you sold it as being easy - or else I might have not even tried. I have to make the following recommendations to those willing to make the switch. 1... You're going to loose out on the http test form, and will need to install a seperate test client, 2 - You will need to learn how WCF slots together, and the configuration can be overly complicated. 3... You're going to need to watch what type of errors you throw back, SOAP exceptions just won't cut it. 4... Its tricky keeping an http context.
JL
It's true that you lose the web service test page, but you gain (for free) the WCF Test Client which is infinitely better :).
Chris Arnold
+4  A: 

Check out some of those blog posts and articles on how to do it:

and many more - search for "Migration ASMX to WCF" and you'll get a ton of hits

Marc

marc_s