问题描述
我有身份管理器设置和本地运行,使用ASP.NET身份工作。我有一个SQL Server 2012数据库后端。我可以创建一个用户,并得到一个列表,但每当我试图创建一个角色,编辑用户或列出角色我得到以下内容:
I have got Identity Manager set up and running locally, working with ASP.NET Identity. I have a SQL Server 2012 database for the backend. I can create a user and get a list back, however whenever I try and create a role, edit a user or list the roles i get the following:
在数据库中创建主拒绝DATABASE权限。
CREATE DATABASE permission denied in database 'master'.
我有连接字符串中的用户是一个有效的SQL登录名,并且是Identity Manager是指在数据库上的用户,(显然可以登录,因为我可以看到在数据库表中的用户),但是它看起来像这些行动的数据库声称连接用户还没有得到许可。
The user i have in the connection string is a valid SQL login and is a user on the database that Identity Manager is pointed at, (and obviously can login as i can see the user in the database table) however it seems like for these actions the database is claiming the user connecting hasn't got permission.
我的AppPoolIdentity下运行Identity Manager的应用程序池。
I am running the app pool for identity manager under the AppPoolIdentity.
鸭preciate任何帮助。
Appreciate any help.
推荐答案
所以,问题是由于首先我没有通过我的上下文中的作用店(我是把它传递给然而我的用户存储),然后确保了身份管理器服务是让我的角色管理器。之后,我通过所有的依赖仔细去我得到了这一切,没有问题的工作。
So issues were due to first of all me not passing my context to the role store (i was passing it to my user store however) and then making sure the identity manager service was getting my role manager. After i went through all the dependencies carefully i got it all working with no issues.
这篇关于ASP NET的Identity Manager数据库权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!