web.config配置问题

interlnk interlnk 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我做了几个页面,调试都没有问题,但是在web.config文件中加入
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name=".ASPXAUTH"></forms>
</authentication>
之后报错:

HTTP 错误 500.19 - Internal Server Error
无法访问请求的页面,因为该页的相关配置数据无效。
详细错误信息:
模块 IIS Web Core
通知 未知
处理程序 尚未确定
错误代码 0x80070032
配置错误 无法读取配置节“authentication”,因为它缺少节声明
配置文件 \\?\c:\users\ran\documents\visual studio 2012\Projects\news\web.config
请求的 URL http://localhost:55523/login.aspx
物理路径
登录方法 尚未确定
登录用户 尚未确定
请求跟踪目录 C:\Users\Ran\Documents\IISExpress\TraceLogFiles\
我是win7的机器,装了VS express 2012 for web,完整的web.config如下:
<?xml version="1.0"?>
<configuration>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name=".ASPXAUTH"></forms>
</authentication>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime/>
</system.web>
<appSettings/>
</configuration>

求高手解决!!!
...全文
评论 3
收藏 已收藏
分享
返回顶部
interlnk
.NET社区 62,274 成员 668,968 内容