如何在.NET中解决Web配置文件错误0x80070032的问题? [英] How can I solve the problem of web config file error 0x80070032 in. NET?

查看:1756
本文介绍了如何在.NET中解决Web配置文件错误0x80070032的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行项目然后显示HTTP ERROR 500.19 - 内部服务器错误而不读取connectionString。



什么我试过了:



我也尝试过:



1.启用所有要求Windows功能

与之相关。



2. IIS应用程序池 - 完成所有

.NET CLR VERSION 4.0。



3.我的网络配置文件包含

connectionString,system.web和

系统。

配置标记下的codedom标记。



请帮帮我。

When I run project then shows the HTTP ERROR 500.19 - Internal Server Error and not read the connectionString.

What I have tried:

I have also tried :

1. Enable all require Windows Features
related to it.

2. IIS Applications Pools - Done ALL
.NET CLR VERSION 4.0.

3. My web config file consists the
connectionString, system.web and
system. codedom tags under the
configuration tag.

Please help me.

推荐答案

如果没有看到代码,就无法猜出问题可能出在哪里是。为了有效地收集更多信息,请使用调试器查看程序运行时出现的情况以及出错的位置。将断点放在适当的位置,调查变量值等等。



要开始使用调试器,请参阅调试器入门 - Visual Studio | Microsoft Docs [ ^ ]
Without seeing the code, it's impossible to guess where the problem might be. In order to efficiently gather more information, use the debugger to see what is happening when the program runs and where it goes wrong. Place breakpoints to proper places, investigate variable values, and so on.

To get started with the debugger, see Get started with the debugger - Visual Studio | Microsoft Docs[^]


看起来像web.config文件中定义的连接字符串中的问题



连接字符串应定义为 -

示例(sql Server) -

< connectionstrings>

<! - SQL Server的连接字符串2005 Express - >

< add name =SiteSqlServerconnectionString =Data Source = serverIP; Initial Catalog = db_Name; User ID = UserId; Password = PwdproviderName =System.Data.SqlClient/>



<! - SQL Server 2000/2005的连接字符串

< add name =SiteSqlServerconnectionString =Server = (本地);数据库= DotNetNuke的; UID =; PWD =; providerName =System.Data.SqlClient/>

- >
Looks like issue in the connection string defined in the web.config file

Connection string should be defined as -
example (sql Server) -
<connectionstrings>
<!-- Connection String for SQL Server 2005 Express -->
<add name="SiteSqlServer" connectionString="Data Source=serverIP;Initial Catalog=db_Name;User ID=UserId;Password=Pwd" providerName="System.Data.SqlClient"/>

<!-- Connection String for SQL Server 2000/2005
<add name="SiteSqlServer" connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;" providerName="System.Data.SqlClient" />
-->


这篇关于如何在.NET中解决Web配置文件错误0x80070032的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆