Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • *Experts*
Posted

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.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...