I’m trying to find out if it’s possible to detect whether a user is visiting the site from a given domain (network domain not website domain) for example is the machine on the businessname.local domain.
I currently implement Forms Authentication for the website which is perfectly suitable. I am looking at implementing an Intranet site for the company.
This would be a completely separate project from the primary site. My goal is to detect that a users computer is on the domain and present them with the option to visit the Intranet and if they wish to do so then I would redirect the user.
Is this possible?
EDIT:
Just for clarification. I’m not asking about implementing Active-Directory Authentication for the Intranet site (I know how to do this). I’m simply wondering if I a method exists to detect the domain and offer to redirect if it’s applicable for a given user.
The solution I came up with to solve the issue was to create a
Controlleron the intranet site that was simply used to return atrueorfalsedepending on Active Directory authentication for the machine accessing it.The intended result was only to display the option of a redirect…not to display actual content so I don’t believe this opens up any security issues (please correct me if I’m wrong).
Due to the cross-domain issues the
Controllerproviding the result has theAccess-Control-Allow-Originheader set…As per W3.org