简体   繁体   English

将ASMX转换为WCF Web服务需要多少工作量?

[英]How much effort is required to convert an ASMX to WCF web service?

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. 我有2个Web服务,总共有大约6个Web方法,大多数代码都是以任何方式放在程序集中,而web服务asmx实际上只是调用这些程序集方法并返回它们的返回类型。

How much effort is it to convert the web services from ASMX to WCF? 将Web服务从ASMX转换为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. 我几乎在这个阶段控制唯一 - 连接到Web服务的非基于Web的客户端,所以这不是一个真正的问题,产品在预启动。

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 还有更多 - 搜索“将ASMX迁移到WCF”,你会得到大量的点击

Marc

You should find it extremely simple to convert - especially if your existing asmx web methods are just calling into other classes. 您应该发现转换非常简单 - 特别是如果您现有的asmx Web方法只是调用其他类。 Just create a new WCF Service from Visual Studio - that way you still have your existing web services intact. 只需从Visual Studio创建一个新的WCF服务 - 这样您仍然可以保持现有的Web服务。 It will automatically create an http end-point for your so you can just dump it straight into IIS (with a little configuration). 它会自动为您创建一个http端点,因此您可以直接将其转储到IIS中(稍加配置)。 You will need to describe your DataContract classes but that it trivially simple too. 您将需要描述您的DataContract类,但它也非常简单。

I did this recently and it was a joy! 我最近这样做了,这是一种快乐!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM