locked
MVC 4 project template with Forms Authentication RRS feed

  • Question

  • User-93143335 posted

    Hi,


    I have a MVC 4 website made with the default template that ships with VS 2013/MVC 4.  When the app is deployed on my test win 2k8R2 server on IIS when you login it says, Hi "Domain\user" in the top bar and the link to the right says "Log off".

    What can I do to prevent it from picking up the active directory user?  As I said the web.confi is set to use Forms authentication.

    Thanks!

    Monday, February 16, 2015 11:54 AM

All replies

  • User-734925760 posted

    Hi,

    So far as I know, you not want to use the active directory provider. you can disable the provider in the web.config.

    For more information, please refer to the link below:

    https://msdn.microsoft.com/en-us/library/ff650308.aspx

    Hope it's useful for you.

    Best Regards,

    Michelle Ge

    Monday, February 16, 2015 10:01 PM
  • User-93143335 posted

    I guess my big hang up is that I have my Web.config set to use Forms, so this means that AD authentication would be turned off correct?  But for some reason in the _LoginPartial.cshtml  there is an if-statement @if(Request.IsAuthenticated) and that is true even before a user logs in.  It says the authenticated user is MyDomain\MyUserName.

    Tuesday, February 17, 2015 9:27 AM