mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-25 10:59:18 +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,
|
// which requires activating the Site content item, which in turn requires a UrlHelper, which in turn requires a RequestContext,
|
||||||
// thus preventing a StackOverflowException.
|
// thus preventing a StackOverflowException.
|
||||||
|
|
||||||
var baseUrl = new Func<string>(() =>
|
var baseUrl = new Func<string>(() => {
|
||||||
siteService.GetSiteSettings().BaseUrl
|
var s = siteService.GetSiteSettings().BaseUrl;
|
||||||
?? "http://localhost" /* When Setup is running from the command line, no BaseUrl exists yet. */);
|
|
||||||
|
// When Setup is running from the command line, no BaseUrl exists yet.
|
||||||
|
return string.IsNullOrEmpty(s) ? "http://localhost" : s;
|
||||||
|
});
|
||||||
|
|
||||||
var httpContextBase = new HttpContextPlaceholder(baseUrl);
|
var httpContextBase = new HttpContextPlaceholder(baseUrl);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user