locked
.Net MVC Authentication RRS feed

  • Question

  • I created a blank .Net MVC application without authentication.  Now, I need to add some very basic authentication to the application.  I've thought about using VisualStudio to create a template app with the basic authentication enabled.  After that I thought I would just copy the models, views, and controllers to my existing application.  Will that be enough or do I need to do more?  Do I need to change the existing application's Global.asx and/or Web.config?  Thanks for the help.

    • Moved by Eason_H Tuesday, November 26, 2013 2:01 AM
    Monday, November 25, 2013 5:43 PM

Answers

  • Hi ample,

    Since the issue regards ASP.NET and MVC. I suggestion you post the question in the ASP.NET forums at http://forums.asp.net/. It is appropriate and more experts will assist you.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Tuesday, January 14, 2014 11:32 PM
    • Marked as answer by Just Karl Thursday, January 23, 2014 10:54 PM
    Tuesday, November 26, 2013 2:01 AM

All replies

  • You will need to change web.config, turn on authentication and deny access to all pages and set address of login page.
    Monday, November 25, 2013 5:53 PM
  • Hi ample,

    Since the issue regards ASP.NET and MVC. I suggestion you post the question in the ASP.NET forums at http://forums.asp.net/. It is appropriate and more experts will assist you.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Tuesday, January 14, 2014 11:32 PM
    • Marked as answer by Just Karl Thursday, January 23, 2014 10:54 PM
    Tuesday, November 26, 2013 2:01 AM
  • Hello,

    Specifically, this should be asked in the ASP.Net MVC forum on forums.asp.net.

    Karl

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    Tuesday, January 14, 2014 11:32 PM