将 ASMX 转换为 WCF Web 服务需要付出多少努力?

发布于 2024-08-06 12:15:31 字数 206 浏览 1 评论 0原文

我有 2 个 Web 服务,总共有大约 6 个 Web 方法,大多数代码都以任何方式位于程序集中,而 Web 服务 asmx 实际上只是调用这些程序集方法并返回它们的返回类型。

将 Web 服务从 ASMX 转换为 WCF 需要付出多少努力?

在这个阶段,我几乎控制着连接到 Web 服务的唯一非基于 Web 的客户端,因此这并不是真正的问题,产品正处于预发布阶段。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我不吻晚风 2024-08-13 12:15:31

查看其中一些关于如何执行此操作的博客文章和文章:

以及更多 - 搜索“Migration ASMX to WCF”并你会得到很多点击,

马克

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

執念 2024-08-13 12:15:31

您应该发现它的转换非常简单 - 特别是如果您现有的 asmx Web 方法只是调用其他类。只需从 Visual Studio 创建一个新的 WCF 服务 - 这样您的现有 Web 服务仍然完好无损。它会自动为您创建一个 http 端点,这样您就可以将其直接转储到 IIS 中(只需进行一些配置)。您将需要描述您的 DataContract 类,但它也非常简单。

我最近做了这个,很高兴!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文