在Spring.Net中使用ConfigurableActiveDirectoryMembershipProvider [英] Using ConfigurableActiveDirectoryMembershipProvider in Spring.Net

查看:103
本文介绍了在Spring.Net中使用ConfigurableActiveDirectoryMembershipProvider的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在代码中使用ConfigurableActiveDirectoryMembershipProvider.我的当前设置为

I want to use ConfigurableActiveDirectoryMembershipProvider in my code. I have my current settings as

<add name="XXXXMembershipProvider" 
     type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"       
     connectionStringName="XXXXConnectionString"     
     connectionUsername="user"
     connectionPassword="password"
     connectionProtection="Secure" />

我已将其更改为

<add connectionStringName="" 
     name="XXXXDomainADMembershipProvider" 
     type="Spring.Web.Providers.MembershipProviderAdapter, Spring.Web" />

并以

<object id="XXXXDomainADMembershipProvider" 
        type="Spring.Web.Providers.ConfigurableActiveDirec toryMembershipProvider">
    <property name="connectionStringName" value="XXXXDomainConnectionString" />
    <property name="connectionUsername" value="user" />
    <property name="connectionPassword" value="password" /> 
</object>

但是我遇到了以下错误

创建上下文"spring.root"时出错:无法从字符串值"Spring.Web.Providers.ConfigurableActiveDirectoryM embershipProvider"中加载类型.

我检查了Spring.WebQuickStart源代码,并且类Spring.Web.Providers.ConfigurableActiveDirectoryMembershipProvider已被注释掉.

I checked the Spring.WebQuickStart source code and the class Spring.Web.Providers.ConfigurableActiveDirectoryMembershipProvider has been commented out.

是我收到上述错误的原因吗?

Is that the reason I am getting the above error?

推荐答案

是的,我认为您是正确的.您得到的错误恰恰是Spring尝试使用无法加载的类型配置对象时返回的错误.例如,如果该类根本不存在,那么这里就是这种情况.

Yes, I think you are correct. The error you are getting is exactly the error Spring returns when you are trying to configure an object using a type that can not be loaded. For instance if the class does not exist at all, which appears to be the case here.

您可以通过使用对象浏览器在项目中使用的Spring.Web程序集中浏览Spring.Web.Providers命名空间,来仔细检查ConfigurableActiveDirectoryMembershipProvider类是否存在.

You can double check if the ConfigurableActiveDirectoryMembershipProvider class exists by using the object browser to explore the Spring.Web.Providers namespace in the Spring.Web assembly you are using in your project.

您说对了,类已在主干代码的当前状态中被注释掉.它有一个待定的小注释,所以我认为他们不确定是否要实现这一点.但是可能是您正在使用的Spring.Web版本中未将其注释掉,因此您仍应使用对象资源管理器对其进行检查.

You are right that the class is commented out in the current state of the trunk code. It has a small TBD note, so I think they are not sure if they want to implement this. But it could be that it wasn't commented out in the version of Spring.Web you are using, so you should still check it using the object explorer.

奇怪的是,其中提到了ConfigurableActiveDirectoryMembershipProvider 文档-您可能希望将其发布在 Spring.Net论坛上,帮助您.

Strangely enough, the ConfigurableActiveDirectoryMembershipProvideris mentioned in the documentation - you might want to post this on the Spring.Net forum they're likely to help you.

这篇关于在Spring.Net中使用ConfigurableActiveDirectoryMembershipProvider的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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