ConfigurationSettings Error

W

William Gower

In my WebService I have a method called Download() that creates a dataset.
To get my connection string which is located in my web.config file I call
the following

imports System.Web.HttpServerUtility

Dim strConnectionString As String
strConnectionString =
ConfigurationSettings.AppSettings("MyConnectionString")


it tells me that "ConfigurationSettings" is not declared.

This is the same code that I use in an asp.net app and it works fine there.
 
M

MA

William Gower said:
In my WebService I have a method called Download() that creates a dataset.
To get my connection string which is located in my web.config file I call
the following

imports System.Web.HttpServerUtility

Dim strConnectionString As String
strConnectionString =
ConfigurationSettings.AppSettings("MyConnectionString")


it tells me that "ConfigurationSettings" is not declared.

This is the same code that I use in an asp.net app and it works fine
there.

Well...I´m a C# programmer, but check if it helps to import
System.Configuration

/Marre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top