0

I want to store the HttpClient BaseAddress Uri on my ASP.NET MVC4 project web.config.

In which section is the correct place to add this configuration?

Erik Philips
  • 51,408
  • 11
  • 123
  • 146
Hugo Hilário
  • 2,660
  • 2
  • 25
  • 40

1 Answers1

1

Add this in web.config

<configuration>
  <appSettings>
    <add key="BaseAddress" value="http://xxx/"/>
  </appSettings>
</configuration>

Get value like this:

ConfigurationManager.AppSettings["BaseAddress"]
Zack Yang
  • 389
  • 2
  • 11