Silverlight的RIA服务 - 怎么办Windows身份验证? [英] Silverlight RIA Services - how to do Windows Authentication?

查看:118
本文介绍了Silverlight的RIA服务 - 怎么办Windows身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建设我的第一个的Silverlight 3 + RI服务应用程序,并需要一些帮助。结果
它将在控制企业内联网部署,100%的窗口客户端。我从Silverlight业务应用程序模板开始。结果这些是我的要求:结果

I am building my first Silverlight 3 + RI Services application and need some help.
It will be deployed in an controlled corporate intranet, 100% windows clients. I have started from the Silverlight Business Application template.
These are my requirements:


  1. 当启动该应用程序需要认识到当前登录的用户。

  2. 的应用程序需要访问AD中用户的其他性能,如电子邮件,全名,和组成员。

  3. 组成员用于盛大的某些功能在应用程序中。

  4. A登录为不同的用户链接是要始终可用 - 有的机器都可以在整个企业中,登录的有一定的通用用户(由于缺乏一定的会员群体的验证)。在这种情况下,可以输入凭据并登录(冒充)应用程序从一个已登录到机器不同的用户。

  5. 这是用户在服务调用中使用

结果
我在默认的业务应用程序模板修改​​如下:


I have modified the following in the default Business Application template:


  1. 的App.xaml:appsvc:WindowsAuthentication而不是默认的FormsAuthentication

  2. 的Web.config:身份验证模式=窗口

使用这些修改我解决需求#1(获取当前登录的用户)。但是,当我检查 RiaContext.Current.User ,我没有获得从公元其他属性,如组成员身份。我如何能实现我的其他要求?

With these modifications I resolve requirement #1 (get the currently logged-in user). But when I examine RiaContext.Current.User, I don't have access to other properties from AD, such as group memberships. How can I achieve my other requirements?

感谢您的帮助。

推荐答案

在为了做到这一点,你必须写自己的配置文件提供程序,然后修改用户类包括这些配置文件的属性,您可以再访问。

In order to do this you will have to write your own Profile Provider and then modify the user class to include these profile properties which you can then access.

有一个看RIA服务概述文档的页第13.3节,让我知道如果你需要任何帮助。

Have a look at page Section 13.3 of the RIA Services Overview document and let me know if you need any help.

我们只是在执行一个RIA Services应用程序的中间,已经写自己的自定义的成员提供和配置文件提供,所以让我知道如果你需要一只手。

We are just in the middle of implementing a RIA Services application and have written our own custom membership provide and profile provider so let me know if you need a hand.

这篇关于Silverlight的RIA服务 - 怎么办Windows身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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