在Spring.Net中使用ConfigurableActiveDirectoryMembershipProvider

编程入门 行业动态 更新时间:2024-10-28 06:23:13
本文介绍了在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

本文发布于:2023-06-04 22:09:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/506070.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Spring   Net   ConfigurableActiveDirectoryMembershipProvider

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!