以编程方式维护 2 个 ASP.NET 调用之间的会话信息?

发布于 2024-08-25 22:42:46 字数 478 浏览 1 评论 0原文

我不确定我的解释是否足够清楚让你们理解,但我会尝试。

这是我的问题:

我们有一个外部站点,我们公司的用户通过提供相应的用户名和密码来连接到该站点。外部站点是 ASP.NET 网站。我们希望将此网站集成到我们的内联网门户中,以便用户无需输入其 UN/Pwd 即可登录该网站。由于目标网站没有提供 SSO,因此我们正在模拟 POST 请求进行登录。

到目前为止,一切都很好。

现在,我们需要在初始登录完成后在另一个页面上执行操作。我们也可以模拟相应的POST请求。但问题是,由于我们在初始 POST 请求中没有维护任何会话信息,它总是重定向到登录屏幕!

有没有办法在以编程方式完成的多个调用之间维护 ASP.NET 会话信息?我们能否以编程方式创建 ASP.NET 会话 ID cookie,然后将其与我们的初始请求一起传递?

或者这根本不可能?

如有任何意见,我们将不胜感激。

感谢您的帮助。

问候。

I'm not sure if I'll be clear enough in my explaination to make you guys understand, but I'll try.

Here's my problem:

We have an external site which the users in our company connect to by giving their corresponding username and password. The external site is an ASP.NET website. We want to integrate this website into our intranet portal so that the users don't have to enter their UN/Pwd to login to the website. Since the target website has no provision for SSO, we are simulating the POST request to login.

So far so good.

We are now required to perform an action after the initial login is done, on an another page. We can simulate the corresponding POST request as well. But the problem is since we are not maintaining any session information in our initial POST request, it always redirects to the login screen!

Is there any way to maintain ASP.NET session information between multiple calls done programmatically? Can we create an ASP.NET session id cookie programmatically and then pass it along with our initial request?

Or this is not possible at all?

Any comments are appreciated.

Thanks for your help.

Regards.

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

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

发布评论

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

评论(1

别在捏我脸啦 2024-09-01 22:42:46

维护状态是其他站点的责任(通常在 cookie 中)。

您应该手动执行这些操作,然后使用 Fiddler 比较 HTTP 请求并找出问题所在。

Maintaining the state is the responsibility of the other site (typically in a cookie).

You should perform the actions manually, then use Fiddler to compare the HTTP requests and figure out what's wrong.

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