我有以下结构
我正在尝试允许匿名访问 login.aspx 和 windows 身份验证到 realsecure/homepage.aspx
我的 IIS 身份验证配置为仅启用匿名。
这是我的 web.config
<?xml version="1.0"?>
<configuration>
<location path="reallysecure">
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="true"></windowsAuthentication>
</authentication>
</security>
</system.webServer>
当我导航到 login.aspx 时,一切都按预期工作。但是,当我重定向到 realsecure/homepage.aspx 时,我收到以下错误:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
81: <authentication>
82: <windowsAuthentication enabled="true"></windowsAuthentication>
83: </authentication>
我如何设置 web.config 和 IIS 来完成我的需要?
谢谢!