.NET - 消费(多米诺)服务器上的HTTP服务的基于表单的身份验证 [英] .NET - Consuming HTTP services on (Domino) server with form based authentication

查看:167
本文介绍了.NET - 消费(多米诺)服务器上的HTTP服务的基于表单的身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写在C#中的实用程序(.NET),将使用HTTP从Domino Web服务器请求数据。

I am writing a utility in C# (.NET) which will use HTTP to request data from a Domino web server.

不过,此服务器使用基于表单的身份验证,而不是基本的HTTP认证。

However, this server uses form based authentication, not basic HTTP authentication.

我试图找出如何code做HTTP获取/邮电使用具有基于表单的身份验证的服务器。

I am trying to find out how to code to do HTTP GETS/POSTS with a server that has form based authentication.

我在ASP.NET想尽谷歌查询,我能想到的,但只要加上基于表单的身份验证在查询中,所有的结果仅与实施服务的服务器端,通常还是Sharepoint的,没有结果有关从客户端消费等服务。

I have tried every google query I can think of, but as soon as the words "form based authentication" are in the query, all of the results only pertain to implementing the service server-side, usually in ASP.NET or Sharepoint, with no results about consuming such services from the client side.

我看到这里建议在堆栈溢出一个相关的问题在Java code,但发现在其他语言的国外原料药的相关部分将是一种冒险。如果有.NET示例code或文档中可用,我真的AP preciate吧。

I saw the Java code from a related question suggested here in Stack Overflow, but finding the relevant parts in foreign APIs in the other language is going to be an adventure. If there is .NET sample code or documentation available, I would really appreciate it.

推荐答案

我相信有人可以提供一个更好的答案,但在思考这个我会假设托管Web服务的服务器有某种形式的登录机制,建立你再认证。所以,我的做法是先发布到登录页面,接受窗体身份验证Cookie,然后继续要进行以下的任何请求。以下所有请求都已经有了窗体身份验证Cookie在其中。

I am sure someone can provide a better answer but thinking about this I would assume your server that hosts the web service has some sort of login mechanism to establish that you're authenticated. So my approach would be to first post into the login page, accept the forms authentication cookie, then continue with whatever following requests you want to make. All following requests will already have the forms authentication cookie in them.

这篇关于.NET - 消费(多米诺)服务器上的HTTP服务的基于表单的身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆