mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-25 02:44:56 +08:00
Fixes #7811
This commit is contained in:
committed by
Sébastien Ros
parent
375c935ec7
commit
fc38e0eb5d
@@ -40,9 +40,12 @@ namespace Orchard.Mvc {
|
||||
// which requires activating the Site content item, which in turn requires a UrlHelper, which in turn requires a RequestContext,
|
||||
// thus preventing a StackOverflowException.
|
||||
|
||||
var baseUrl = new Func<string>(() =>
|
||||
siteService.GetSiteSettings().BaseUrl
|
||||
?? "http://localhost" /* When Setup is running from the command line, no BaseUrl exists yet. */);
|
||||
var baseUrl = new Func<string>(() => {
|
||||
var s = siteService.GetSiteSettings().BaseUrl;
|
||||
|
||||
// When Setup is running from the command line, no BaseUrl exists yet.
|
||||
return string.IsNullOrEmpty(s) ? "http://localhost" : s;
|
||||
});
|
||||
|
||||
var httpContextBase = new HttpContextPlaceholder(baseUrl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user