Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

css does not work in hosted .net core 2.0

$
0
0

Hi guys
my css files dont work after I publish my site in .net core

I have registered my static folder which is lib under the wwwroot, and despite deleting all files and rebuilding it, it still does not work. I have tried using /wwwroot/lib and just /wwwroot nothing works

Please help
Ehi

app.UseStaticFiles();
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot"))
,
RequestPath = new PathString("/wwwroot")
});

Also when i add the RequestPath to the watch window, I get the error  

RequestPath error CS0103: The name 'RequestPath' does not exist in the current context 



Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>