You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The configured endpoint URL gets hard-coded as the value of a static variable (MyWebApiProxyBaseAddress) in the generated .cs file.
I need to be able to generate the proxy against a development endpoint, but target different endpoints at run-time (i.e. so I can move my app through QA, UAT and into a Live environment): the runtime configuration shouldn't require re-generation and re-compilation.
Nice work BTW :-)
The text was updated successfully, but these errors were encountered:
I solved this by adding a partial class 'WebApiConfiguration.partial.cs' which sets the base address in its constructor.
usingSystem.Configuration;namespaceWebApi.Proxies{/// <summary>/// Partial class for the Web API Proxy client configuration. /// </summary>publicpartialclassConfiguration{staticConfiguration(){MyWebApiProxyBaseAddress=ConfigurationManager.ConnectionStrings["QdcWebApiBaseAddress"].ConnectionString;}}}
The configured endpoint URL gets hard-coded as the value of a static variable (MyWebApiProxyBaseAddress) in the generated .cs file.
I need to be able to generate the proxy against a development endpoint, but target different endpoints at run-time (i.e. so I can move my app through QA, UAT and into a Live environment): the runtime configuration shouldn't require re-generation and re-compilation.
Nice work BTW :-)
The text was updated successfully, but these errors were encountered: