We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • Re: VS 2019 APS.NET VB IIS 10 - Error Code 0x80070021

    Sep 10, 2020 07:37 AM|Jalpa Panchal|LINK

     open .vs\config\applicationhost.config:

    Look for the following lines:

    <section name="windowsAuthentication" overrideModeDefault="Deny" />
    <section name="anonymousAuthentication" overrideModeDefault="Deny" />
    <add name="WindowsAuthenticationModule" lockItem="true" />
    <add name="AnonymousAuthenticationModule" lockItem="true" />

    Change those lines to:

    <section name="windowsAuthentication" overrideModeDefault="Allow" />
    <section name="anonymousAuthentication" overrideModeDefault="Allow" />
    <add name="WindowsAuthenticationModule" lockItem="false" />
    <add name="AnonymousAuthenticationModule" lockItem="false" />

    Save the file and refresh your asp.net web page. 

    if you are using iis:

    1)Open IIS Manager

    2)Select the server in the Connections pane

    3)Open Configuration Editor in the main pane

    4)In the Sections drop-down, select the section to unlock, e.g.system.webServer/security/authentication/anonymousAuthentication

    5)Click Unlock Attribute in the right pane

    6)Restart IIS (optional) - Select the server in the Connections pane, click Restart in the Actions pane

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.