Try our conversational search powered by Generative AI!

Programmatically get service Url

Vote:
 

Apologies for the elementary question

How can I programmatically get hold of the episerver.find url in the web.config e.g.

<episerver.find serviceUrl="http://es-api01.episerver.com/fttdfJbRGb7iq2TTATT0RlXXX/" defaultIndex="brownt_test1"/>

It would be good if I could get the defaultIndex as well. I'm used getting app settings values but not other areas of web.config

Many Thanks for any all help

#86496
May 22, 2014 15:20
Vote:
 
EPiServer.Find.Configuration.GetConfiguration().ServiceUrl;
#86520
May 22, 2014 22:39
Vote:
 

That's great. It works. Thank you.

#86642
May 27, 2014 11:38
Vote:
 

Hi, 

How do you get the public url that you need for autocomplete with javascript?

#90837
Sep 18, 2014 23:52
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.