First off, I'm not entirely sure that my question title is very descriptive, so my apologies for that.
I am working on a new site and will be using the MembershipProvider system (well, a custom implementation anyway), and I've run across a 开发者_如何学Cunique problem. Since the machine I'm developing this on is hooked up to my employers ActiveDirectory domain, whenever I use any of the Login controls, it constantly shows me as being logged in, pulling the DOMAIN\user.name from ActiveDirectory, even though I haven't created any user accounts yet with the Membership system.
Now, I know why it's doing this; it's because the Login controls pull the username from the Page's Request property, which is always going to pull my domain account. My question is, can I override this? I need to because since I am using a custom membership model, I need to test the login/logout functionality, and I can't do that when it constantly shows me as being logged in. :)
Any information or links would be greatly appreciated. I did look through the "Related Questions" before posting this, and didn't find anything directly related to my question. Thanks again.
James
It sounds like you have windows authentication turned on in your website. First of all, make sure it's no longer turned on (the only auth method enabled should be "forms"), and then make sure that your custom membership provider is registered correctly.
I hope this points you in the right direction.
/Klaus
精彩评论