locked
Not able to debug in Visual Studio 2017 RRS feed

  • Question

  • User-1188570427 posted

    I am seeing this error when I try to debug in Visual Studio 2017. I can't change anything on IIS, so what do I do?

    Here is my web.config:

      <system.web>
        <machineKey validationKey="472746AFE7C9E160AC970C6D28A3F0102967298BFB861738AD43DC2227EDD1F6BE543000AE7976A893D50C67216ABAB757FF50FAD65401AF12EA8F2F8351BBF4" decryptionKey="34DC01312C3C8DC6C5A61B226076C24281EBEB0DA1575466" validation="HMACSHA256" decryption="AES"/>
        <trust level="Full"/>
        <compilation debug="true" targetFramework="4.6.1"/>
        <httpRuntime targetFramework="4.6.1"/>
        <pages>
          <namespaces>
            <add namespace="System.Web.Optimization"/>
          </namespaces>
          <controls>
            <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
            <!--<add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />-->
          </controls>
        </pages>
        <authentication mode="None"/>
        <authorization>
              <deny users="*" />
        </authorization>
      </system.web>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
            <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Common.Logging.Core" publicKeyToken="af08829b84f0328e" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <system.codedom>
        <compilers>
          <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
          <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
        </compilers>
      </system.codedom>

    HTTP Error 401.2 - Unauthorized

    You are not authorized to view this page due to invalid authentication headers.

    <fieldset>

    Most likely causes:

    • No authentication protocol (including anonymous) is selected in IIS.
    • Only integrated authentication is enabled, and a client browser was used that does not support integrated authentication.
    • Integrated authentication is enabled and the request was sent through a proxy that changed the authentication headers before they reach the Web server.
    • The Web server is not configured for anonymous access and a required authorization header was not received.
    • The "configuration/system.webServer/authorization" configuration section may be explicitly denying the user access.
    </fieldset>

    <fieldset>

    Things you can try:

    • Verify the authentication setting for the resource and then try requesting the resource using that authentication method.
    • Verify that the client browser supports Integrated authentication.
    • Verify that the request is not going through a proxy when Integrated authentication is used.
    • Verify that the user is not explicitly denied access in the "configuration/system.webServer/authorization" configuration section.
    • Check the failed request tracing logs for additional information about this error. For more information, click here.
    </fieldset>

    Tuesday, August 28, 2018 11:14 PM

Answers

  • User-1188570427 posted

    You could post to the IIS forums. 

    https://forums.iis.net/

    I did:

    https://forums.iis.net/p/1239372/2143057.aspx?p=True&t=636711180850487589

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 29, 2018 12:41 PM

All replies