我已经为一个流程设置了一个Azure WebJob,该流程可以通过单个请求向新用户发送大量邀请。我使用SimpleMembership但我收到以下错误
The Role Manager feature has not been enabled.
我已经查看了这个问题/答案Mvc Runtime error - The Role Manager feature has not been enabled
我认为这将解决我遇到的问题,但我不确定我可以在app.config
中将其放入哪里(WebJobs不要web.config
)
我也试过这个What would be equivalent web.config configuration for "enableSimpleMembership"="true:,但那没有帮助。
我需要知道在app.config
<membership defaultProvider="SimpleMembershipProvider">
<providers>
<add name="SimpleMembershipProvider" type="WebMatrix.WebData.SimpleMembershipProvider" />
</providers>
</membership>
<roleManager defaultProvider="SimpleRoleProvider" enabled="true">
<providers>
<add name="SimpleRoleProvider" type="WebMatrix.WebData.SimpleRoleProvider" />
</providers>
</roleManager>
或者我做错了吗?
答案 0 :(得分:0)
事实证明,app.config
实际上包含<system.web>
部分...
<system.web>
<membership defaultProvider="SimpleMembershipProvider">
<providers>
<clear />
<add name="SimpleMembershipProvider" type="WebMatrix.WebData.SimpleMembershipProvider, WebMatrix.WebData" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="SimpleRoleProvider">
<providers>
<clear />
<add name="SimpleRoleProvider" type="WebMatrix.WebData.SimpleRoleProvider, WebMatrix.WebData" />
</providers>
</roleManager>
</system.web>