-
Notifications
You must be signed in to change notification settings - Fork 25.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade static files sample to 2.x #5606
Comments
What in the document is out of date for 2.0? |
Could probably call this a dup ... this one is on the tracking issue for update: #5495 Yes, @peterblazejewicz, it's going to get the "full treatment" 😄 lol, including the updates for 2.1. |
dup of #5495 |
Hi folks, |
@peterblazejewicz #5495 deals with the sample updates, and this one is on the list. We're probably going to bypass taking it to 2.0 and roll in the 2.1 updates as well. Also, this sample isn't a Razor Pages sample, and it will likely become a Razor Pages app when it's upgraded. |
Can we keep the server simple and nimble? And be able to serve static content first - before using heavy gun like Razor pages. I'd like to be able to just setup a static page (say on single chip, $5 computer, just html hosting page and javascript for client application). |
@peterblazejewicz Yes, I see what you mean. Absolutely, yes! ... Just start with an empty web starter template and add in the Static File Middleware as described in the topic. That empty web starter project doesn't have MVC or Razor Pages bits ... it's just bare bones. It only writes a "Hello World!" out. If you want to see the template for it in the GitHub repo, it's here 👉 https://github.com/aspnet/templating/tree/dev/src/Microsoft.DotNet.Web.ProjectTemplates/content/EmptyWeb-CSharp ... take a look at the If you want to generate that project locally, you can use Visual Studio and select the empty ASP.NET Core web starter template for a new project. If you're not using Visual Studio, run Then, just add the Static File Middleware with We also have some nice content over in the Hosting topic ... especially the beginning, where it talks about creating a web host: https://docs.microsoft.com/aspnet/core/fundamentals/hosting?tabs=aspnetcore2x ... that will help you understand what I'm going to note our discussion here over in the tracking issue. When that whole topic (and the sample) is updated, the author might be able to address your scenario by stating that Static File Middleware can be used independently of other middlewares, MVC, and Razor Pages. |
Awesome, that's really helpful! |
Sure thing ... glad I could help. If you need to chat with devs about ASP.NET Core, many devs hang out on the ASP.NET Core Slack channel. The self-signup is here: http://tattoocoder.com/aspnet-slack-sign-up/ ... and there are many channels that pertain to specific areas of ASP.NET Core, but you can ask just about anything in the #general or #aspnet-core chat rooms. |
I'd like to ask for update of sample content available here:
https://github.com/aspnet/Docs/tree/master/aspnetcore/fundamentals/static-files/samples
to cover version 2.*.
The docs discussing the content in subject are here:
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/static-files?tabs=aspnetcore2x
I've found that most of the content related to static, simple web site with dotnet are now outdated as they cover version 1.*, so it would be nice to have that sample upgraded.
Thanks!
The text was updated successfully, but these errors were encountered: