HTTP 404 on generated site
See original GitHub issueHi,
I’ve been using Microsoft.SourceBrowser
from NuGet, but it doesn’t support the new project format with MSBuild 15.0, or new syntax with Roslyn 2.0.
I’ve managed to build the latest code from source.
I used the following command-line to generate the index and website:
C:\Git\SourceBrowser\src\HtmlGenerator\bin\Debug\net46\HtmlGenerator.exe /force /out:__SourceBrowser__ /in:ProjectList.txt
The generated site appears to mostly work, but there’s no main page. URLs such as /i.txt
work, but /
just returns a HTTP 404.
At first I thought this might be an IIS issue, so I used dotnet
to run Kestrel and got the same result.
C:\CW\__SourceBrowser__>dotnet .\Microsoft.SourceBrowser.SourceIndexServer.dll --help
Hosting environment: Production
Content root path: C:\CW\__SourceBrowser__
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 170.0031ms 404
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 0.7488ms 404
Am I missing a step, or is the generated site actually incomplete?
Issue Analytics
- State:
- Created 6 years ago
- Comments:27 (27 by maintainers)
Top Results From Across the Web
Error 404: 4 Ways to Fix It
This HTTP status code means the requested page can't be found on the website server. It may indicate a flaw with a hosting...
Read more >How to Fix Error 404 Not Found on Your Site
The Error 404 Not Found status code indicates that the origin server did not find the target resource. Check out these common causes...
Read more >Error 404 not found - What does it mean & how to fix it!
The typical trigger for an error 404 message is when website content has been removed or moved to another URL. There are also...
Read more >How to make a custom 404 error page for your website
Step 1: Are you using a website builder like Squarespace or Weebly? · Step 2: Create your custom 404 page in HTML. ·...
Read more >HTTP 404
A 404 error indicates that the server itself was found, but that the server was not able to retrieve the requested page. History....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just re-ran with the latest
HtmlGenerator
.wwwroot
is present and the site works.Thanks!
It looks like this was a breaking change from 1.1 sdk to the 2.0 sdk. In the 1.1 sdk Content items were included in the publish output by default. In 2.0 Content items are only included in the publish output if CopyToPublishDirectory metadata is set on them. I will send a PR to fix this.