I want to know the best way to implement it. I have a asp.net web app which does not have any login page/options. But I need to populate different options in the web page based on User roles (admin, Member etc..). How can I know what is the role of current user logged in on the windows machine. Can I do this in my Java script page? or is there a way to retrieve it from IIS?
Asked
Active
Viewed 25 times
1 Answers
0
You can fetch certain details using environment variables. Follow - https://weblogs.asp.net/owscott/viewing-all-server-variables-for-a-site
To test it out, create a test.aspx page under the same application on IIS and copy-paste the C# code mentioned in the article. Try accessing the page from a client machine and check what results you get.

Parvez Mulla
- 526
- 4
- 7