Hi all,
I am working on a scenario whereby I need to implement the following features:
- Users inside my business can log on to our CRM from inside our network using NTLM (i.e. no typing of usernames and passwords, authenticating against Active Directory).
- Users outside my business can log on to the same CRM from outside our network using Forms authentication, authenticated against SQL Server (using the ASP.NET SQL Membership features).
- I need to be able to use a unique key in entities such as discussion threads to identify the author contributing the content - e.g., if I were using a discussion board on the CRM, and posted from inside using an NTLM account, or outside using Forms, the system should know how to find my name from the membership provider.
So far, I have implemented a simple method which takes a ProviderUserKey from an unknown provider and then, using a check to see if the key is a Guid, will look up the user the key belongs to in SQL Membership (if the key is indeed a Guid), or from Active Directory (if the key is not a Guid, but a SID instead).
I realise this solution is not very elegant so my question is this:
Is it possible to create one site, from one codebase, which will authenticate users with NTLM against AD, Forms against SQL and with the ability to find users in either membership provider by storing just the ProviderUserKey in tables in my application?
I hope this questions makes sense, and I'd appreciate some feedback from those wiser than me in this area (most of you!).
Best Regards,
Daniel
Daniel Arkley | IT / Telecoms Support Engineer | Southern Communications Ltd