通过 WIF 进行匿名访问

发布于 2024-11-07 12:27:13 字数 361 浏览 2 评论 0原文

在彻底寻找答案后,这次我必须永远问我的第一个问题!

这里是:
我有一个 Windows 窗体应用程序,它使用十几个 WCF 服务来处理所有业务逻辑。 WIF 在每个 WCF 服务上实现,并且通过基本的用户名身份验证对用户进行身份验证。
除了我们拥有的 Ping() 方法之外,一切都运行良好。
在实现 WIF 之前,我们曾经在启动屏幕期间使用虚拟 Ping() 方法调用每个 WCF 服务,以确保服务已启动,但现在用户无法访问此方法,因为他尚未登录。

有没有办法在实现 WIF 的服务中区分经过身份验证的方法和匿名方法?我想没有,所以我想知道 STS 是否可以颁发匿名令牌?

我现在完全没有想法,所以任何帮助或只是一些提示将不胜感激:)

After having searched for an answer thoroughly on SO, I have to ask my first question for good this time !

Here goes :
I have a Windows Forms app, which uses a dozen WCF services to handle all the business logic.
WIF is implemented on every single WCF service, and users are authenticated through a basic UserName authentication.
Everything works well except the Ping() method that we have.
Before WIF was implemented, we used to call every WCF service with a dummy Ping() method during the splash screen to ensure the service was up, but now the user can't access this method since he's not logged yet.

Is there a way to distinguish Authenticated and Anonymous Methods in a service on which WIF is implemented ? I suppose there isn't, so I'd like to know if maybe an anonymous token could be issued by the STS ?

I'm pretty out of ideas right now, so any help or just some hints would be greatly appreciated :)

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

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

发布评论

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

评论(1

停顿的约定 2024-11-14 12:27:13

根据您的配置,您可以在站点的特定文件夹中创建一组服务,然后将自定义配置添加到不包含身份验证和会话模块的该位置。

举个例子:

<location path="AnonymousServices">
    <system.webServer>
        <modules>
            <remove name="WSFederationAuthenticationModule" />
            <remove name="SessionAuthenticationModule" />
        </modules>
    </system.webServer>
</location>

我没有在实践中尝试过这个,但它应该有效。

Depending on your configuration, you could create a set of services within a specific folder in your site, then add custom configuration to that location that would not include the Authentication and Session modules.

As an example:

<location path="AnonymousServices">
    <system.webServer>
        <modules>
            <remove name="WSFederationAuthenticationModule" />
            <remove name="SessionAuthenticationModule" />
        </modules>
    </system.webServer>
</location>

I have not tried this in practice, but it should work.

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