弃用 ASP.NET Web 方法

发布于 2024-09-08 03:50:14 字数 334 浏览 8 评论 0原文

我有一些面向内部的 ASP.NET Web 服务,多年来添加了许多 API。一些原始的 Web 方法虽然仍可供使用,但已推荐可用的替代方法。我想引导消费客户使用这些新方法,这样我就可以退休并最终取代他们的长辈。

如果这是客户端 API 而不是 Web 服务 API,我只需使用 obsolete 属性标记有问题的方法。但是 .NET 属性不会被序列化,并且在使用开发人员添加或刷新 Web 引用时对它们不可见。

建议使用哪些技术来废弃 ASP.NET Web 方法?工具(VS2005-2010)中是否内置了任何东西?我不想破坏任何现有的客户端,因此我不能简单地完全删除 Web 方法或更改其内部行为以将其使用报告为错误。

I have some internal-facing ASP.NET web services that have had numerous API additions over the years. Some of the original web methods, while still available for consumption, have recommended replacements available. I would like to steer consuming clients toward using these new methods so I can retire and eventually remove their elders.

If this were a client API rather than a web service API, I'd just mark the offending methods with the obsolete attribute. But .NET attributes do not get serialized and are not visible to consuming developers when they add or refresh web references.

What techniques are recomended for obsoleting ASP.NET web methods? Is there anything built into the tooling (VS2005-2010)? I don't want to break any of the existing clients, so I can't simply remove the web methods outright or change their internal behavior to reprot their usage as erroneous.

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

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

发布评论

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

评论(1

掩耳倾听 2024-09-15 03:50:14

蒂姆,不幸的是,对此问题的简短回答是,您必须联系这些客户,与他们沟通变更并商定时间表等。您可能可以采取一些措施来帮助他们顺利完成流程,特别是如果他们不是 IT 人员精明的客户必须让外部承包商构建他们的应用程序。

你可以用任何你喜欢的方式为他们加油,从系统将被替换,到我们正在做得更大、更好、更快。

此外,您可以构建代码来减慢它们的速度,不推荐,但是当他们询问时,您可以给他们,我们不再支持该系统,它已被系统“X”取代。

如果你所说的新方法仍然只是网络方法,你可以将旧方法指向新方法,然后让客户使用旧方法。

另一种选择是识别卡在旧方法上的客户端,获取他们的 IP 地址并将其锁定,以便只有他们可以使用它,这样可以确保新客户端不会尝试连接到旧方法。

除此之外,我想不出任何对您和客户来说不会造成痛苦或困难的事情。

Tim, the short answer to this is unfortunately that you have to contact those clients and communicate the change with them and agree on timelines etc. There might be something that you can do to smooth the process over for them, particularly if they are not IT savvy clients and had to get their applications built by external contractors.

You can butter this up any way you like for them really, from the system is going to be replaced, to we are doing it bigger, better and faster.

Additionally you can build in code to slow them down, NOT RECOMMENDED, but then when they inquire you can give them the, we don't support that system any longer, it has been replaced by system 'X'.

If the new methods you are talking about are still just web-methods, you can just point the old ones to the new ones, and let the clients use the old one.

Another option is to identify the clients stuck on the old methods, get their IP addresses and lock it down so only they can use it, this way you ensure new clients will not attempt to connect to the old methods.

Other than that, I cannot think of anything that will not be a pain or difficult for both yo and the client.

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