2014-03-28 2 views
0

나는 이것을 이해할 수 없다. 이 코드는 흠 잡을 데없이 아주 오래 동안 실행되었습니다. 이제는 아무데도 실패합니다. 그것이 호출하는 웹 서비스는 변경되지 않았으며 나는 일종의 손실을 겪고 있습니다. 디자이너의웹 서비스 던지기 오류

webservices.WebService ws = new webservices.WebService(); 

코드 :

namespace NumberOneService.Properties { 

[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 

    private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 

    public static Settings Default { 
     get { 
      return defaultInstance; 
     } 
    } 

    [global::System.Configuration.ApplicationScopedSettingAttribute()] 
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
    [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] 
    [global::System.Configuration.DefaultSettingValueAttribute("http://www.webserver.services/ws_partlookup.cfc")] 
    public string Web_Service { 
     get { 
      return ((string)(this["Web_Service"])); 
     } 
    } 
} 

스택 추적 : 사용자가 만든 경우에 일반적으로 발생

at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e) 
    at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(String configPath, BaseConfigurationRecord configRecord) 
    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) 
    at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) 
    at System.Configuration.ConfigurationManager.GetSection(String sectionName) 
    at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped) 
    at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties) 
    at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider) 
    at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName) 
    at System.Configuration.SettingsBase.get_Item(String propertyName) 
    at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName) 
    at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName) 
    at NumberOneService.Properties.Settings.get_Web_Service() in Number One Service\Properties\Settings.Designer.cs:line 33 
    at NumberOneService.webservices.WebService..ctor() in Number One Service\Web References\webservices\Reference.cs:line 46 
    at NumberOneService.NumberOneService.bwExecuteProcess_DoWork(Object sender, DoWorkEventArgs e) in Number One Service.cs:line 400 
    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) 

답변

0

특정 오류 내가 사용 {"Configuration system failed to initialize"}

코드입니다 클래스 라이브러리의 웹 서비스 참조를 가져 와서 콘솔 앱이나 이길 때 이식했다. 응용 프로그램을 dows. 웹 서비스 참조는 특정 경로와 함께 설정 파일에 저장됩니다.

기본적으로 구성 파일에 섹션 선언 또는 올바른 설정 이름이 없습니다. 설정 파일에서 서비스 URL을 저장하는 키를 확인하십시오. 그렇지 않으면 여기에 붙여 넣기 만하면됩니다.

구성 파일에서 URL을 설정할 때 예외가 웹 서비스 생성자에서 발생합니다. (호스트 구성 또는 설정 파일)