web.config配置问题
我做了几个页面,调试都没有问题,但是在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>
求高手解决!!!