Can't read Web.Config


Jul 21, 2004
Programming Experience
I have a VB.Net app that calls into the web service. The web service has some configuration setting in it that I need to read, and I use the following code to read the custom configurations.......

Dim config As Specialized.NameValueCollection =

It comes back with nothing; as if the sepcified tag is not there. However, since I am using VB.Net app to call into the webservice, I can use the VB.Net's app.config file and it can read that without any problem with the same code. But, I need to read the web service's web.config file for the custom settings. If any one has any ideas about what is going on, please let me know. Thanks in advance.
It might have something to do with permissions on the folder where the web.config file is stored. Because if you have to login to view any page in that folder then you may have to do the same with the web.config file.
thanks for the reply. All the files are still local. I have the web server on my machine as well as the VB.Net app and the web service right now. So, I am not sure if that is the case 'cause I can browse to the folder and the file without any problem.

Check the syntax of your call, web.config is very particular for example:

<customErrors mode="off"/> 'Doesnt Work...

<customErrors mode="Off"/> 'Works!