I wrote a web application. The web application implemented by claims identity authenticated and authorized but this app must run in an institution. They need Authenticate and Authorize by Active directory and usual way(i mean with a user name and pass by a login page.) In general, I need both of them. It means users are inside and outside of Active [login to view URL] are inside of Active directory can log in without the user name and pass and others must use the login page.
I found this solution, [login to view URL]
at the moment, I got current user that login by windows Authuntication but it dosen't have any role. and my part of program has a exception (object reference not set to an instance of an object).
I got exception from this line,object reference not set to an instance of an object.
var Role = [login to view URL](x => [login to view URL] == [login to view URL]).Value;