Postgres 的 ASP.NET 成员/角色提供者?
我正在创建一个 MVC 站点,并希望使用 .Net 的内置成员资格和角色。 我正在使用 Postgresql 的 .Net 数据提供程序 (Npgsql),但在定义成员资格 defaultProvider 和 Postgresql 连接字符串以连接到我的本地数据库时遇到问题。 有人可以帮忙吗?
I am creating an MVC site and would like to use the built in Membership and Roles for .Net.
I'm using the the .Net Data Provider for Postgresql (Npgsql), but am having trouble defining the membership defaultProvider and Postgresql connection string to connect to my local database.
Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我还没有验证这一点,但很快就会在项目中使用它。希望我能了解更多信息,并且它会“正常工作”:)
http://code.google.com/p/pgsqlprovider/" rel="noreferrer">http://code.google.com/p/pgsqlprovider google.com/p/pgsqlprovider/
希望使用此软件堆栈
Windows Server 2008
PostgreSQL
PostGIS
城堡 ActiveRecord
NHibernate
NHibernate.Spatial
带有成员资格/角色提供程序的 ASP.NET MVC 3
[后续]
我运行 NuGet 命令“Install-Package Nauck.PostgresSQLProvider”来安装由 Daniel Nauck 创建的 PostgreSQL ASP.NET 成员资格提供程序和贾森·斯诺尔。
http://nuget.org/List/Packages/Nauck.PostgresSQLProvider
项目主页
http://dev.nauck-it.de/projects/aspsqlprovider
您需要运行此 SQL 来创建成员资格表:
http://dev .nauck-it.de/projects/aspsqlprovider/repository/revisions/master/changes/src/NauckIT.PostgreSQLProvider/DatabaseSchema.sql
最后,web.config 文件需要更新...我使用了这个例子方向:
http://dev.nauck -it.de/projects/aspsqlprovider/repository/revisions/master/entry/src/Example/Web.config
到目前为止,身份验证有效,散列密码也有效,剩下来测试的就是授权。
I have not verified this, but will be using it in a project soon. Hopefully I will have more info to follow, and it will "just work" :)
http://code.google.com/p/pgsqlprovider/
Hoping to use this software stack
Windows Server 2008
PostgreSQL
PostGIS
Castle ActiveRecord
NHibernate
NHibernate.Spatial
ASP.NET MVC 3 with Membership/Role providers
[FOLLOW UP]
I ran the NuGet command "Install-Package Nauck.PostgresSQLProvider" to install the PostgreSQL ASP.NET Membership Provider created by Daniel Nauck and Jason Sznol.
http://nuget.org/List/Packages/Nauck.PostgresSQLProvider
Project Home
http://dev.nauck-it.de/projects/aspsqlprovider
You'll need to run this SQL to create the membership tables:
http://dev.nauck-it.de/projects/aspsqlprovider/repository/revisions/master/changes/src/NauckIT.PostgreSQLProvider/DatabaseSchema.sql
Finally the web.config file will need to be updated... I used this example for direction:
http://dev.nauck-it.de/projects/aspsqlprovider/repository/revisions/master/entry/src/Example/Web.config
So far authentication works, as does hashed passwords, all thats left to test is authorization.
我对 nauck 版本有点沮丧,所以我写了自己的版本。您可以在此处尝试一下您想要的内容。它有单元测试和一些文档。
I was a little frustrated with the nauck version, so I wrote my own. You can try it out here it you'd like. It has unit tests and a bit of documentation.