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!

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

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.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ipservant created

    Thank you, that works fine!

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)