【发布时间】:2008-10-29 00:01:18
【问题描述】:
我需要为 ASP.NET mvc 应用程序创建自定义会员用户和提供程序,并且我希望使用 TDD。我创建了一个继承自 MembershipUser 类的 User 类,但是当我尝试对其进行测试时,我得到了一个我无法弄清楚的错误。如何给它一个有效的提供者名称?我只需要将它添加到 web.config 中吗?但我现在还没有测试网络应用程序。
[失败] UserTests.SetUp.UserShouldHaveMembershipUserProperties 测试用例'UserTests.SetUp.UserShouldHaveMembershipUserProperties' failed: 指定的成员资格提供者名称无效。 参数名称:providerName System.ArgumentException 消息:指定的成员资格提供者名称无效。 参数名称:providerName 来源:System.Web
【问题讨论】:
标签: c# asp.net authentication