Base solution for your next web application
Open Closed

Equivalent to AppConsts.remoteServiceBaseUrl in host part #9079


User avatar
0
ipservant created

Hello,

I'm struggling on a thing that looks fairly simple at first sight, but I didn't find the right hint yet... We have the situation in an AppService where we need to call another web service (a document converter) and provide him with a callback URL of one of our host controllers.

Now the question is, how do I get the equivalent to AppConsts.remoteServiceBaseUrl in the host AppService? To me the value of the appsettings.json ServerRootAddress would make sense to use, but how can I get that in an AppService?

Thanks for your help!


2 Answer(s)
  • User Avatar
    1
    maliming created
    Support Team

    hi

    I think you can inject IWebUrlService in the application service and call its GetServerRootAddress method.

  • User Avatar
    0
    ipservant created

    Thank you, that works fine!