samsmithnz Posted January 30, 2004 Posted January 30, 2004 In an ASP.NET project I would add this to my web.config: <appSettings> <!--Webservice server location--> <add key="ConnectionString" value="[My Conn string...]" /> </appSettings> And then this to ASPX page and I would be able to retrieve the value: strConn = ConfigurationSettings.AppSettings.Get("ConnectionString") But in a web service this doesn't work for me. It says "Name 'ConfigurationSettings' is not declared". What am I doing wrong? Quote Thanks Sam http://www.samsmith.co.nz
*Experts* Bucky Posted January 30, 2004 *Experts* Posted January 30, 2004 ConfigurationSettings is a member of the System.Configuration namespace. Add an Imports statement your code file to include this namespace. You may have to add a project reference to include this namespace. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
samsmithnz Posted January 30, 2004 Author Posted January 30, 2004 Ahhhhh that makes perfect sense too. Why is it a default option in ASP.NET, but off in Web Services? I would have thought they would be equally useful... Quote Thanks Sam http://www.samsmith.co.nz
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.