How to get values from app.connfig when there is a web reference?
-
Hi, I added a web reference and I wanted to dynamically get the link. So I thought to store it in the app.config as shown below. When I tried to read it from the below shown C# code it returns a null value. app.config C# code string WsUrl = ConfigurationManager.AppSettings["ABC"].ToString(); Does anybody know how to fix it? Any help would be great! Rgds, Sampathg
-
Hi, I added a web reference and I wanted to dynamically get the link. So I thought to store it in the app.config as shown below. When I tried to read it from the below shown C# code it returns a null value. app.config C# code string WsUrl = ConfigurationManager.AppSettings["ABC"].ToString(); Does anybody know how to fix it? Any help would be great! Rgds, Sampathg
I think that if you are writing a Web Services you need a Web.config not App.Config. Try to rename the file to Web.config Davide
-
I think that if you are writing a Web Services you need a Web.config not App.Config. Try to rename the file to Web.config Davide
Davide, First of all thanks a lot for helping.. I tried that too. But the result is the same. Any other suggestions? Rgds, Sampath