Web 服务和 cookie 处理

发布于 2024-10-04 05:45:48 字数 275 浏览 0 评论 0原文

有一个网络服务,它的操作依赖于浏览器发送的cookie。只要浏览器访问该服务,该服务就可以正常工作,但当其他服务或程序访问该服务时,该服务就会失败。

我想在步骤2.a中引入的aspx文件具有对原始cookie的完全访问权限。我需要一种方法,以便在步骤2.b中转发2.a中的cookie

(开发2.a和2.b后不需要步骤3)

谢谢 alt text

谢谢

There's an web service and it depends on the cookies sent by the browser for its operations. The service works fine as long as it is being accessed by a browser, but fails when it is accessed by another service or program.

The aspx file that I want to introduce in step 2.a has full access to the original cookies. I need a way so that the cookies in 2.a are forwarded in step 2.b

(step 3 is not required after 2.a and 2.b are developed )

Thanks
alt text

Thanks

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

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

发布评论

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

评论(1

真心难拥有 2024-10-11 05:45:48

首先,以某种方式将 cookie 获取到您的 C# 代码中。

其次,使用 CookieContainer您的 Web 服务代理的属性,用于设置要使用的 cookie。

First, get the cookies to your C# code, somehow.

Second, use the CookieContainer property of your web service proxy to set the cookies to use.

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