diff --git a/src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs b/src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs index eeebda22af..eb3d63d733 100644 --- a/src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs +++ b/src/AbpDesk/AbpDesk.MongoBlog/AbpDesk/Blogging/AbpDeskMongoBlogModule.cs @@ -36,7 +36,7 @@ namespace AbpDesk.Blogging options.FileSets.Add( new EmbeddedFileSet( - "/", + "/wwwroot/", GetType().Assembly, "wwwroot" //TODO: This is not tested yet! ) diff --git a/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll b/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll index ae3224578d..6426ca7db2 100644 Binary files a/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll and b/src/AbpDesk/Web_PlugIns/AbpDesk.MongoBlog.dll differ diff --git a/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs b/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs index 54146dd1ca..86821b802d 100644 --- a/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs +++ b/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.Account.Web options.FileSets.Add( new EmbeddedFileSet( - "/", + "/wwwroot/", GetType().GetTypeInfo().Assembly, "Volo.Abp.Account.Web.wwwroot" ) diff --git a/src/Volo.Abp.AspNetCore.EmbeddedFiles/Microsoft/AspNetCore/Builder/VirtualFileSystemApplicationBuilderExtensions.cs b/src/Volo.Abp.AspNetCore.EmbeddedFiles/Microsoft/AspNetCore/Builder/VirtualFileSystemApplicationBuilderExtensions.cs index ed17232d91..b5b2bc603e 100644 --- a/src/Volo.Abp.AspNetCore.EmbeddedFiles/Microsoft/AspNetCore/Builder/VirtualFileSystemApplicationBuilderExtensions.cs +++ b/src/Volo.Abp.AspNetCore.EmbeddedFiles/Microsoft/AspNetCore/Builder/VirtualFileSystemApplicationBuilderExtensions.cs @@ -10,7 +10,8 @@ namespace Microsoft.AspNetCore.Builder new StaticFileOptions { FileProvider = new AspNetCoreVirtualFileProvider( - app.ApplicationServices + app.ApplicationServices, + "/wwwroot" ) } ); diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs index a460915b82..eb26848c2d 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/AbpAspNetCoreMvcUiBootstrapModule.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap { options.FileSets.Add( new EmbeddedFileSet( - "/", + "/wwwroot/", GetType().GetTypeInfo().Assembly, "Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.wwwroot" ) diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml index b8231d799e..7f97198e2b 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.cshtml @@ -14,7 +14,7 @@ - + @RenderSection("styles", false) diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj index de6144f615..f1770f0305 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.css b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/wwwroot/views/shared/_AppLayout.css similarity index 100% rename from src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Views/Shared/_AppLayout.css rename to src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/wwwroot/views/shared/_AppLayout.css diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI/AbpAspNetCoreMvcUiModule.cs b/src/Volo.Abp.AspNetCore.Mvc.UI/AbpAspNetCoreMvcUiModule.cs index 7e342cfee2..5be312b7d8 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI/AbpAspNetCoreMvcUiModule.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI/AbpAspNetCoreMvcUiModule.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Mvc options.FileSets.Add( new EmbeddedFileSet( - "/", + "/wwwroot/", GetType().GetTypeInfo().Assembly, "Volo.Abp.AspNetCore.Mvc.wwwroot" ) diff --git a/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreVirtualFileProvider.cs b/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreVirtualFileProvider.cs index 97c7294cdf..a00fb58f69 100644 --- a/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreVirtualFileProvider.cs +++ b/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AspNetCoreVirtualFileProvider.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Options; @@ -13,11 +14,12 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem private readonly Lazy _virtualFileProvider; private readonly Lazy _options; private readonly IObjectAccessor _serviceProviderAccessor; + private readonly string _contentPath; - public AspNetCoreVirtualFileProvider(IServiceProvider serviceProvider) + public AspNetCoreVirtualFileProvider(IServiceProvider serviceProvider, string contentPath = null) : this(new ObjectAccessor(serviceProvider)) { - + _contentPath = contentPath; } public AspNetCoreVirtualFileProvider(IObjectAccessor serviceProviderAccessor) @@ -37,6 +39,11 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem public IFileInfo GetFileInfo(string subpath) { + if (_contentPath != null) + { + subpath = _contentPath + subpath; + } + //TODO: Ignore files in _options.Value.IgnoredFileExtensions if (!IsInitialized()) @@ -49,6 +56,11 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem public IDirectoryContents GetDirectoryContents(string subpath) { + if (_contentPath != null) + { + subpath = _contentPath + subpath; + } + //TODO: Ignore files in _options.Value.IgnoredFileExtensions if (!IsInitialized()) diff --git a/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs b/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs index 552bc50f60..676837ca85 100644 --- a/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs +++ b/src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs @@ -43,7 +43,7 @@ namespace Volo.Abp.Identity.Web options.FileSets.Add( new EmbeddedFileSet( - "/", + "/wwwroot/", GetType().Assembly, "Volo.Abp.Identity.Web.wwwroot" )