<p>I am using forms authentication. My users are redirected to a page (written in web.config) when they login, but some of them may not have the privilages to access this default page. In this case, I want them to redirect to another page but RedirectFromLoginPage method always redirects to the default page in web.config. How do I make the users login, and then redirect to a page which depends on some criteria?</p>

[{'answer_id': 36879, 'author': 'Joseph Daigle', 'author_id': 507, 'author_profile': 'https://Stackoverflow.com/users/507', 'pm_score': 4, 'selected': True, 'text': '<p>The <code>SetAuthCookie</code> allows you to issue the auth cookie but retain control over the navigation. After that method is called you can run your logic to do a typical ASP.NET redirect to wherever you want.</p>\n'}, {'answer_id': 11499845, 'author': 'peyman', 'author_id': 1528166, 'author_profile': 'https://Stackoverflow.com/users/1528166', 'pm_score': 1, 'selected': False, 'text': '<pre><code>if(mc.GetfaalUsers(mm.UserName.ToString())=="True")\n{\n    this.Page.ClientScript.\n       RegisterClientScriptBlock(this.GetType(), "key", \n                                 "alert(\'این نام کاربری فعال نشده است\');", false);\n    FormsAuthentication.SignOut();\n    Response.Redirect("default.aspx");\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/36876', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/31505/']