使用匿名身份验证时,无效的身份验证标头

时间:2019-05-02 05:47:13

标签: c# forms forms-authentication

我试图在我的应用程序中实现表单身份验证,但是浏览本地IIS托管的应用程序时出现“无效的身份验证标头”错误。以下是我在浏览器窗口中看到的屏幕截图。

enter image description here

这是web.config中为Forms Auth添加的代码段

   <system.web>
        <compilation debug="true" targetFramework="4.0" />     
        <authentication mode="Forms">
          <forms loginUrl="login.aspx" protection="None" />
        </authentication>
        <authorization>
          <deny users="?" />
        </authorization>
      </system.web>

1 个答案:

答案 0 :(得分:0)

您在<config-file target="AndroidManifest.xml" parent="/manifest/application"> <activity android:name="com.foo.Foo" android:label="@string/app_name"> <intent-filter> </intent-filter> </activity> </config-file> 标记中使用了<authorization>。这将拒绝对匿名用户的访问。

相关问题