using System; using System.Configuration; using System.Collections.Specialized; namespace elh.Agent { /// /// Description of config. /// public class config { private string m_webserviceurl; private NameValueCollection configsettings; public config() { configsettings = (NameValueCollection)ConfigurationSettings.GetConfig("appSettings"); if(configsettings == null) Logger.write_message("NameValue is null!"); m_webserviceurl = configsettings["WebServiceUrl"]; if(m_webserviceurl == null) Logger.write_message("m_webserviceurl is null!"); } public string WebServiceUrl { get{ return m_webserviceurl; } } } } app.config: logfile: m_webserviceurl is null! at System.Uri..ctor(String uriString) at System.Web.Services.Protocols.WebClientProtocol.set_Url(String value) at proxy..ctor(String webserviceurl) in c:\Dokumente und Einstellungen\mgolisch\Eigene Dateien\SharpDevelop Projects\elh-agent\proxy.cs:line 34 at elh.Agent.eventlog_agent.monitorevents() in c:\Dokumente und Einstellungen\mgolisch\Eigene Dateien\SharpDevelop Projects\elh-agent\eventlog-agent.cs:line 98