How to create asp.net web page with basic authentication

前端 未结 1 415
庸人自扰
庸人自扰 2021-01-28 05:45

I want to create ASP.NET web page which will prompt me basic authentication popup where in I will enter credentials. I tried adding below lines of code in PreInit and PreLoad ev

1条回答
  •  闹比i
    闹比i (楼主)
    2021-01-28 06:11

    You would typically do this in IIS. See: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/security/authentication/basicauthentication

    The short version:

    • ensure that the basic authentication feature is enabled on your server
    • disable anonymous authentication in your site and enable basic authentication

    0 讨论(0)
提交回复
热议问题