mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixed an issue with a null BaseUrl during Setup from Orchard.exe.
Fixes #6320
This commit is contained in:
@@ -39,7 +39,10 @@ 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);
|
||||
var baseUrl = new Func<string>(() =>
|
||||
siteService.GetSiteSettings().BaseUrl
|
||||
?? "http://localhost" /* When Setup is running from the command line, no BaseUrl exists yet. */);
|
||||
|
||||
var httpContextBase = new HttpContextPlaceholder(baseUrl);
|
||||
|
||||
return httpContextBase;
|
||||
|
||||
Reference in New Issue
Block a user