0

I did CRM Web application and Login page works good. I just want to learn how can i authenticate my page. I need your advices.

For example, My startup page is "localhost/Login.aspx" and user can login and redirect to "localhost/default.aspx"

However, user also can access "localhost/default.aspx" page without login page. User can access everywhere using by links.

How can i authenticate this ? How can i provide when user write "localhost/otherpage", web app must say ,"first user must be logon."

1 Answer 1

1

If you are using Visual Studio 2013 or Asp.Net 4.5, you can use Asp.Net Identity to authenticate your user. for Previous versons of Asp.Net you can use Form Authentication which is built in.
If you don't want to use built in Authentication, You can create a session or cookie at login time, check the session value on the pageload of page you want to authenticate. If value is null redirect to login Page.

Personaly I prefer you to use Form Authentication upto .Net 4.0 and Asp.Net Identity for Asp.Net 4.5.

Once you get the logic you can put your own checks to see User is authenticated and authorize.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.