1

I am using my own user login tables of SQL Database for login.

After checking it is a valid user from DB, i want to set the valid user details to Context.User and set IsAuthenticated to true.

How can i do this?

Thanks in Advance.

Shailu
  • 11
  • 3
  • 1
    Take a look at the [getting started docs](http://www.asp.net/identity/overview/getting-started/introduction-to-aspnet-identity) – jrummell Jun 05 '16 at 22:51
  • 1
    Are you really using ASP.Net Identity? – DavidG Jun 05 '16 at 22:57
  • 1
    If you are using Identity look at [this answer](http://stackoverflow.com/questions/31584506/how-to-implement-custom-authentication-in-asp-net-mvc-5/31585768#31585768) – Sam FarajpourGhamari Jun 06 '16 at 14:32
  • No, i am not using ASP.Net Identity. I am storing user information in SQL database and validating user using stored procedure. When i confirm, it is a valid user then how can enable IsAuthenticated property in the context? To check further in all the application pages and to keep the logged in status through the application until they log out. – Shailu Jun 06 '16 at 21:01
  • Hope I could explain you what you needed. – Shailu Jun 06 '16 at 21:01

1 Answers1

0

I recognized the issue where it was....

I could achieve my issue by commenting below code in web.config.

<!-- <modules>
<remove name="FormsAuthentication"/>
</modules>-->
Shailu
  • 11
  • 3