Entwickler-Ecke

Verteilte Systeme - ConfigurationManager.AppSettings("URI") ist NULL


Mr.y - Fr 03.09.10 20:27
Titel: ConfigurationManager.AppSettings("URI") ist NULL
Hallo, Ich hab ein Problem mit meinem Client.
Und zwar hab ich in der App.config folgendes geschrieben:


XML-Daten
1:
2:
3:
4:
5:
<configuration>
  <appSettings>
    <add key ="ServiceURI" value ="net.tcp://localhost:8080/IContracts"/>
  </appSettings>
</configuration>


Nun möchte ich eine Referenz beim Client erstellen und er sagt mir, dass die URI Null ist


C#-Quelltext
1:
EndpointAddress clsServiceAdresse = new EndpointAddress(ConfigurationManager.AppSettings["ServiceURI"]);                    


Was mir bekannt ist, dass der key aus der appconfig einfach bei AppSettings reingeschrieben wird, aber warum ist er null??
Bin für jede Hilfe dankbar :)