Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

web.config forms authentication

Posted on 2011-03-18
1
Medium Priority
?
337 Views
Last Modified: 2012-08-13
Hi all,

I have the following in my web.config;

    <authentication mode="Forms">
      <forms name=".ASPXAUTH" loginUrl="login/login.aspx" />
    </authentication>
    <authorization>
      <deny users="?" />
    </authorization>

this is working great. However, when a user logs in they are redirected to a different home page dependent upon their role in the db.

so for example admin is redirected to admin/default.aspx, a client client/default.aspx, etc..

Now after a user logs in I want to do the following;

either redirect to the page they were trying to access, or their relevant home page? is this possible using this authentication?

Thanks,

Matt.
0
Comment
Question by:flynny
1 Comment
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 2000 total points
ID: 35167764
I assume you're using the login control on login/login.aspx - you can just handle the LoggedIn event of that control and use Response.Redirect() to send the user anywhere you want.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question