从不同的应用程序访问 Web 服务中的参数

发布于 2024-09-14 03:06:06 字数 219 浏览 2 评论 0原文

我有 C# webservice webmethods 托管在服务器上并由不同的应用程序(web、winforms 等)访问。

有什么方法可以检测到这些参数是从 winforms 发送的,这些参数是从 web 服务上的 web 服务发送的?

他们所做的只是添加一个网络引用并传递参数,我希望最终看到他们传递了哪些参数(以测试一些用例)。

有什么想法吗?

谢谢。

I have C# webservice webmethods hosted on a server and accessed by different applications(web,winforms etc).

Is there any way i can detect that these parameters are sent from winforms, these are from webservices on a webservice?

All they do is adding a web reference and passing parameters, i wish to see in my end what parameters they pass (to test some use cases).

Any thoughts?

Thanks.

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

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

发布评论

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

评论(1

黄昏下泛黄的笔记 2024-09-21 03:06:06

如果您想区分来自 Webform 和 Winform 的调用,您需要将其构建到方法调用本身中。

例如,您可以向映射到客户端类型的每个方法添加一个参数并找出这种方式。

Web 服务的全部要点在于它们与客户端无关 - 只要调用正确,哪种应用程序调用 Web 服务并不重要。

If you want to differentiate calls from a webform vs a winform, you will need to build that into the method calls themselves.

For example, you could add a parameter to each method that maps to type of client and find out that way.

The whole point of web services is that they are client agnostic - so long as the call is correct, it doesn't matter what kind of application called the web service.

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