0
我開發C#的小型應用程序中,我使用的是SQL Server數據庫,但是當我運行我的應用程序我得到這個錯誤:C#WinForm應用程序
An unhandled exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
Additional information: Configuration system failed to initialize
誰能幫我解決這個錯誤?
The code of my save button shown in this image where exception error occurred和 我的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'文件!顯然**配置系統**有問題(因爲異常消息明確指出) –
應用程序無法加載配置區段,因此在這裏發佈您的app.config肯定會有所幫助。 –
請用相關的保存代碼[編輯]你的問題,而不是鏈接到圖像。 –