User475983607 posted
Thanks for checking this. my requirement is
Check if user have access to another intranet site (Site-A) from my application (Site-B). (both these uses windows login)
i dont have control on Site-A.
You misunderstand. Windows user are granted or denied access to a web site. Again, the web.config or application folder properties shows which users have access to a web application. Simply redirect the user to Site-A. If the user
has access to Site -A then the user can view the site. Otherwise, the user will see a access denied.
Your application (Site-B) runs under the application pool identity. When Site-B tries to make an HTTP request, the request is running as Site-B's application pool identity not the Windows user.
At this point it's not real clear what problem you are trying to solve. Is Site-A a REST service? Most likely the key is contacting the owners of Site-A and asking for assistance.