0
guillaumemorin created
Is there a built-in ABP class that I can inject into my ApplicationService, to retrieve an absolute url of a page in my app ? I need to send an email containing an url to my app.
Thanks!
1 Answer(s)
-
0
Hi,
No, there is not. You can create an interface (like IWebUrlService) in Core project and implement it in .Web project (with WebUrlServiceName) and register it to DI (you can simply implement ITransientDependency). Then inject IWebUrlService and use anywhere.
Notice that: Absolute URL of a web site may not be known if you can not reach to HttpContext.Current.Request or maybe your code is running in a Windows Service etc. In that case, you can define a setting for that.