类型为' System.Configuration.ConfigurationErrorsException'的未处理异常发生在mscorlib.dll

时间:2015-11-29 12:56:36

标签: vb.net

我使用VS2015在VB语言中编写以下代码,但是有一些错误。我找不到错误。

Private Sub BottonCreatePlaylist_Click(sender As Object, e As EventArgs) Handles BottonCreatePlaylist.Click
    UserName = txtUserName.Text

    If UserName = "" Then
        MessageBox.Show("Please enter a user name!")
    Else
        Dim ExPlaylistDoc As New Xml.XmlDocument
        Dim ExPlaylistService As New TempService.ServiceSoapClient
        ExPlaylistDoc.LoadXml(ExPlaylistService.getPlayLists())
        AllLists = ExPlaylistDoc.DocumentElement

        Dim playlists As Xml.XmlNodeList = AllLists.SelectNodes("PlayList")
        Dim playlist As Xml.XmlNode
        Dim n As Integer = 1

        For Each playlist In playlists
            If playlist.Attributes.Count > 0 Then

                Dim check As String = playlist.Attributes(0).Value

                If UserName = check Then
                    n = 0
                End If
            End If

        Next

        If n > 0 Then
            If ExPlaylistService.CreatePlaylist(UserName) Then
                MessageBox.Show("New User Created")
            End If
            getPlaylist()
            displayList()
        Else
            MessageBox.Show("User has exsited!")
            txtUserName.Clear()
        End If
    End If

End Sub

它显示了" ExPlaylistDoc.LoadXml(ExPlaylistService.getPlayLists())"中的错误。服务组件完美运行。我将服务引用添加到客户端组件。客户端组件不起作用。以下是输出。

' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_64 \ mscorlib \ 2.0.0.0__b77a5c561934e089 \ mscorlib.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ Microsoft.VisualStudio.HostingProcess.Utilities \ 14.0.0.0__b03f5f7f11d50a3a \ Microsoft.VisualStudio.HostingProcess.Utilities.dll&# 39 ;.跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Windows.Forms \ 2.0.0.0__b77a5c561934e089 \ System.Windows.Forms.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System \ 2.0.0.0__b77a5c561934e089 \ System.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Drawing \ 2.0.0.0__b03f5f7f11d50a3a \ System.Drawing.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ Microsoft.VisualStudio.HostingProcess.Utilities.Sync \ 14.0.0.0__b03f5f7f11d50a3a \ Microsoft.VisualStudio.HostingProcess.Utilities。 Sync.dll&#39 ;.跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ Microsoft.VisualStudio.Debugger.Runtime \ 14.0.0.0__b03f5f7f11d50a3a \ Microsoft.VisualStudio.Debugger.Runtime.dll&# 39 ;.跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' H:\ Visual Studio 2015 \ Projects \ TemperatureClient \ TemperatureClient \ bin \ Debug \ TemperatureClient.vshost.exe'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Configuration \ 2.0.0.0__b03f5f7f11d50a3a \ System.Configuration.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_64 \ System.Data \ 2.0.0.0__b77a5c561934e089 \ System.Data.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Deployment \ 2.0.0.0__b03f5f7f11d50a3a \ System.Deployment.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.DirectoryServices \ 2.0.0.0__b03f5f7f11d50a3a \ System.DirectoryServices.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_64 \ System.EnterpriseServices \ 2.0.0.0__b03f5f7f11d50a3a \ System.EnterpriseServices.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Runtime.Serialization \ 3.0.0.0__b77a5c561934e089 \ System.Runtime.Serialization.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.ServiceModel \ 3.0.0.0__b77a5c561934e089 \ System.ServiceModel.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Web.Services \ 2.0.0.0__b03f5f7f11d50a3a \ System.Web.Services.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Xml \ 2.0.0.0__b77a5c561934e089 \ System.Xml.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Core \ 3.5.0.0__b77a5c561934e089 \ System.Core.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Xml.Linq \ 3.5.0.0__b77a5c561934e089 \ System.Xml.Linq.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Data.DataSetExtensions \ 3.5.0.0__b77a5c561934e089 \ System.Data.DataSetExtensions.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ Microsoft.VisualBasic \ 8.0.0.0__b03f5f7f11d50a3a \ Microsoft.VisualBasic.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 线程0xf10已退出,代码为0(0x0)。 线程0x1878已退出,代码为0(0x0)。 线程0x1204已退出,代码为0(0x0)。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' H:\ Visual Studio 2015 \ Projects \ TemperatureClient \ TemperatureClient \ bin \ Debug \ TemperatureClient.exe'。符号已加载。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.Runtime.Remoting \ 2.0.0.0__b77a5c561934e089 \ System.Runtime.Remoting.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ SMDiagnostics \ 3.0.0.0__b77a5c561934e089 \ SMDiagnostics.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.WorkflowServices \ 3.5.0.0__31bf3856ad364e35 \ System.WorkflowServices.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.ServiceModel.Web \ 3.5.0.0__31bf3856ad364e35 \ System.ServiceModel.Web.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ Microsoft.VisualStudio.Diagnostics.ServiceModelSink \ 3.0.0.0__b03f5f7f11d50a3a \ Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll&# 39 ;.跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 ' TemperatureClient.vshost.exe' (CLR v2.0.50727:TemperatureClient.vshost.exe):已加载' C:\ WINDOWS \ assembly \ GAC_MSIL \ System.IdentityModel \ 3.0.0.0__b77a5c561934e089 \ System.IdentityModel.dll'。跳过加载符号。模块已经过优化,调试器选项“Just My Code'已启用。 抛出异常:' System.Configuration.ConfigurationErrorsException'在mscorlib.dll中 程序' [5040] TemperatureClient.vshost.exe'退出时使用代码-1(0xffffffff)。

我希望你能帮助我。

感谢。

0 个答案:

没有答案