Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 10, 2007 04:37 PM by guideline
Jan 10, 2007 04:37 PM|LINK
Apparently, the club site starter kit was designed to be used only with Forms authentication because if you try to use Windows authentication, everything breaks (mainly NullReferenceExceptions). My scenario is simple - I am trying to use the kit in an intranet
situation. In other words, I want to use Windows authentication, Windows groups as roles, &etc. The problem with this is that the programmers used Membership.GetUser().ProviderUserKey all over the place...this is for Forms authentication. I tried a quick fix
by catching the NullReferenceException hoping (illogically, since I know better than to believe this would actually work) that it would then work. However, when you do that, the application fails to update the database. I'm racking my brain trying to think
of a way to deal with this issue but to no avail. Is there a way that I can simply replace the Membership.GetUser().ProviderUserKey lines everywhere with something that does the same thing but for Windows authentication? Even so, I'd still have to build something
to relate all the Windows users to the app's database. Is it too much to hope for a redesign? Should I build a custom layer of code to deal with this issue or am I overcomplicating things?