这是我的 web.config 文件:
<configuration>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
<connectionString>
<add
name="ColMAX"
connectionString="data Source=SHANTHA;Initial Catalog=Billing_Test;Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionString>
<system.web>
<compilation debug="true"/>
<authentication mode="Forms">
<forms
defaultUrl="~Default/.aspx"
loginUrl="~/Login.aspx"
slidingExpiration="true"
timeout="2880"></forms>
</authentication>
</system.web>
</configuration>
我无法访问登录页面。这是我得到的错误:
详细错误信息:
模块:IIS Web Core
通知:未知
处理程序:尚未确定
错误代码:0x80070032
配置错误:配置部分&#39;编译&#39;不可能是 阅读,因为它缺少一个部分声明配置文件
\?\ c:\ users \ sudath \ documents \ visual studio 2013 \项目\科伦玻\科伦玻\ web.config中
我刚开始我的项目。任何人都可以解决这个问题吗?
答案 0 :(得分:1)
更新您的Web.config,如下所示。
<configuration>
<connectionString>
<add name="ColMAX" connectionString="data Source=SHANTHA;Initial Catalog=Billing_Test;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionString>
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
<authentication mode="Forms">
<forms defaultUrl="~Default/.aspx" loginUrl="~/Login.aspx" slidingExpiration="true" timeout="2880"></forms>
</authentication>
</system.web>
</configuration>
为.Net frameWork 4.5注册应用程序池
导航至
C:\的Windows \ Microsoft.NET \框架\ v4.0.30319
在此处打开命令窗口(Ctrl + Shift + RightClick) - &gt;在这里打开命令窗口。
在命令窗口中键入以下commad。
aspnet_regiis.exe -i
希望这能解决你的问题。