[英]C# winform application with Microsoft SQL Server database
我在C#中开发了一个小型应用程序,在其中使用SQL Server数据库,但是在运行应用程序时出现此错误:
System.Configuration.dll中发生类型为'System.Configuration.ConfigurationErrorsException'的未处理异常
附加信息:配置系统初始化失败
谁能帮我解决此错误?
此图像中显示了发生异常错误的“我的保存”按钮的代码以及“我的app.config”。 文件是:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<connectionstring>
<add name="dbx" connectionstring="Data Source=JAWADKHAN-PC;Initial Catalog=jawad;Integrated Security=True" Providername="System.Data.SQLClient">
</add>
</connectionstring>
</configuration>
检查您的app.config文件。 在配置部分之后添加configSections。 更改顺序如下:
<configuration>
<configSections>
....
</configsections>
.
.
如果这不能解决您的问题,请发布app.config文件进行审查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.