WCF Restful Web服务的自定义基本身份验证

问题描述:

嗨!我是Web服务的新手,并且已经拥有WCF Restful Web服务的现有系统,该系统由外部应用程序调用并返回xml.我想为所有这些实现自定义基本身份验证.要求是,在每个请求上,HTTP请求中都将包含包含Base64位编码的用户名和密码的身份验证标头.我必须拦截该请求,检查它是否为经过身份验证的用户,然后进行响应.我检查了许多项目,并在Internet上进行了大量搜索,但未找到包含整个方案的单个示例.谁能帮我吗?我需要分步教程..

谢谢
Dev

Hi !! I am novice to web-services and I have already existing system with WCF Restful web service which are called by external applications and returns xml. I want to implement custom basic authentication for all of them. The requirement is that on every request there will be authentication header in HTTP request that contains Base64 bit encoded username and password. I have to intercept the request, check whether it is authenticated user or not and then response. I have checked many of project and search a lot on internet but not found any single example which contains whole this scenario. Can anyone help me please? I want a step-by-step tutorial..

Thank you,
Dev

亲爱的朋友,

您应该已经对此进行了一些Google搜索.

当我搜索Google时,我得到了有关您的问题的可搜索链接的以下列表:-



在WCF REST服务上进行基本身份验证 [ ^ ]

该链接为您提供了解决方案.希望对您有所帮助

谢谢
Dear Friend,

You should have done some google search on it.

When i searched the google i got the following listing of searchable links on your problem:-



Basic Authentication on a WCF REST Service[^]

This link provides you the solution. I hope this will help you out

ThanksBasic Authentication Search[^]