0

I have soap service url. I added that url as Add web reference and access its properties and methods but the problem is I want to access the properties and method exposed by service by adding that service in app.config. I dont want to add service reference by right click and add service reference.

Developer
  • 173
  • 2
  • 13
  • there are plenty of examples with pictures that will guide you step by step in how to consume a web-service in .net. try google ... there is also material on how to dynamically consume a web service by using the Settings as well but why would you not want to add the service reference..? perhaps you can explain that – MethodMan Nov 23 '17 at 16:50
  • I didnt get what exactly i was looking for. If you have please share. BTW whats the point to downvote the question? I didnt get the solution so i asked? Whats wrong in that? – Developer Nov 23 '17 at 16:51
  • if you add the web service properly the endpoints will be added automatically to the .config file.. try scrolling all the way to the bottom of the .Config file and see if the reference has not been added to the file once you consume the reference by using the traditional right clicking and adding the web reference.. you should be able to access that from application reading the Config file just like you would for all other key value pairs in the file.. – MethodMan Nov 23 '17 at 16:56
  • @MethodMan..i agree but i want to change the url without creating a new build. Thats how i want to manage the two different url for test and production server? Do you have any other option? – Developer Nov 23 '17 at 18:17
  • I think that you have a misunderstanding on how you can do this without having to create a new build.. you can actually change the value itself in the .config file on the 2 separate environments. I currently do this for a 3rd party web service setting the web service as dynamic – MethodMan Nov 23 '17 at 23:13
  • @MethodMan.. but its not working for me. It is taking same old url. – Developer Nov 24 '17 at 07:22
  • how can anyone help if you do not post the code as well as the App.Config file settings that you have setup.. sounds like you will have to figure this one out on your own until you post relevant code as it pertains to your current issue – MethodMan Nov 24 '17 at 15:43

0 Answers0