Questions tagged [wwwroot]
84 questions
51
votes
4 answers
wwwroot folder in asp.net core 2.2
I have just created a new ASP.NET Core web application and selected an empty project template. I am using Visual Studio Community 15.7.1.
Upon a first look at the solution explorer I can see no "wwwroot" folder there. Does anyone happen to know if…

FranB
- 651
- 1
- 6
- 9
11
votes
4 answers
ASP.NET Core application won't run: no DIST folder and "Cannot find module './wwwroot/dist/vendor-manifest.json'"
I have pulled an existing ASP.NET Core application that previously worked on a different computer.
When I run the application on this computer, I get the following error:
AggregateException: One or more errors occurred. (Cannot find module…

Lars Holdgaard
- 9,496
- 26
- 102
- 182
9
votes
2 answers
Static Files in wwwroot not contained in Docker Image
just playing around a little bit.
I got a Visual Studio Solution, containing 3 projects.
All of the three are needed.
One project ("one") is the UI of the application. It contains static files in wwwroot of course.
I want to dockerize the…

xola
- 455
- 1
- 4
- 15
7
votes
2 answers
How can I find the physical path of wwwroot, in a Razor page without a controller?
I need to make a file list in a list, which used to be easy.. but not on Asp.Net Core 2 Razor pages. I cannot find a way to get the physical path of "Poems" which is inside "wwwroot".
I found many examples using IHostingEnvironment but always in a…

DJ5000
- 83
- 2
- 8
7
votes
1 answer
Is it possible to store Images other than wwwroot folder
I stored Images In a folder name "Images" which is not in wwwroot folder.
So now i am unable to access it so my question is that
How to give access to folder which contain images and thats folder is not the sub-folder of wwwroot? Or Its compulsory …

Ahmad Qasim
- 452
- 1
- 8
- 26
7
votes
3 answers
ASP.NET Core's asp-append-version attribute not working for static files outside of the wwwroot directory
I have an ASP.NET Core project with static files in both the wwwroot directory and bower_components directory.
I am able to server these files by adding this to my Startup.cs class:
StaticFileOptions rootFileOptions = new…

AxiomaticNexus
- 6,190
- 3
- 41
- 61
7
votes
1 answer
Foldertype of wwwroot from ASP.NET Core and use it in MVC 5
I manage all my plugins in my ASP.NET MVC application with bower.
The problem:
Bower works great, but when it installs the plugins, I don't see them in my solution. I'd have to show all files (which is not updated automatically) and then include…

Stefan
- 14,826
- 17
- 80
- 143
6
votes
3 answers
Should I commit my wwwroot/lib folder in ASP .Net Core Web Application
I've just created an ASP .Net Web Application using the dotnet new webapp command.
I wonder if I the wwwroot/lib folder should be committed?
It looks like it contains versioned libraries and the version is not mentioned anywhere else in the…

satma0745
- 667
- 1
- 7
- 26
5
votes
2 answers
How can I get a list of file paths for static image files in Blazor WebAssembly?
I'm trying to get a list of the static files inside of my wwwroot folder in a Blazor WebAssembly project. This is what I've tried so far:
string[] images = Directory.GetFiles(@"wwwroot\images", "*.jpg");
I get this error:
crit:…

Dustuu
- 77
- 2
- 8
5
votes
2 answers
Tired of copying node_modules to wwwroot folder
I have an ASP.NET 5 project with a plenty of Node.js modules. They are installed under the node_modules folder.
In the development environment (environment=development), I started copying all the modules to wwwroot\lib manually. When that became…

wonderful world
- 10,969
- 20
- 97
- 194
3
votes
1 answer
How to read files from wwwroot in Maui?
In a maui blazor app I created the folder wwwroot/audio and put some files there. How can I get all the filenames from this directory?
string mainDir = FileSystem.Current.AppDataDirectory;
var audioFiles =…

nogood
- 1,117
- 1
- 11
- 34
3
votes
1 answer
Access a folder outside of wwwroot with a symlink
I am running a intranet website on IIS. Now my task is to access a folder with a normal href="" outside of the wwwroot folder. I think this isn't possible, so I tried to symlink the folder. I successfully created a symlink to the folder. But now I…

poza
- 245
- 1
- 3
- 10
3
votes
1 answer
ASP.NET Core empty project. How to make bower and wwwroot work properly
I have started a new ASP.NET Core empty project and want to add bootstrap and JQuery through bower, but there is no "bower.json" file.
So i've added one with the following content:
{
"name": "asp.net",
"private": true,
"dependencies": {
…

MorgoZ
- 2,012
- 5
- 27
- 54
3
votes
0 answers
How to properly change wwwroot to another directory
What is the proper way to reconfigure the default "wwwroot" folder to something else or, additionally, default to an inner folder?
My current structure has wwwroot/dist as the root folder. I added the line
.UseWebRoot("wwwroot/dist")
to the…

Jake Shakesworth
- 3,335
- 4
- 29
- 43
2
votes
2 answers
Display Images located in wwwroot folder with a foreach loop
I need to display employee names and their corresponding image below on a blazor webpage, So far I have the names displayed fine but can only loop through one image due to not knowing how to loop through the wwwroot folder so each name has the same…

korflool
- 27
- 6