roleprovider

Refresh current user's role when changed in ASP.NET identity framework?

落花浮王杯 提交于 2019-11-26 11:25:20
问题 Using VS 2013, standard MVC template, and the Identity provider framework The user is logged in, and I have: //.... UserManager.AddToRole(User.Identity.GetUserId(), \"Members\"); # Line X RedirectToAction(\"Index\", \"Members\"); And the Members controller is as follows: [Authorize(Roles=\"Members\")] public class MembersController : Controller { // GET: Members public ActionResult Index() { return View(); } } After Line X is executed, I can confirm that the user is added to the table dbo

SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

╄→гoц情女王★ 提交于 2019-11-26 05:34:03
问题 Well i have a big problem that i\'m trying for days to solve but i could not do it, so i need your help. I have a web application in asp.net 4.0 where i implemented custom membership and role providers. When i open the app homepage in it connects to the database and retrieves some information. There is also a login form and when i login it validates the user through the database and redirects me to the reserved pages but than this error appears: A network-related or instance-specific error