Skip to content
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

UseWelcomePage is too greedy #113

Closed
richlander opened this issue Aug 6, 2014 · 4 comments
Closed

UseWelcomePage is too greedy #113

richlander opened this issue Aug 6, 2014 · 4 comments

Comments

@richlander
Copy link
Member

Experience:

  • Create empty ASP.NET vNext project in VS
  • Add text file to project
  • Launch site
  • Type URL for text file
  • Server returns file. Yeahh!
  • Add app.UseWelcomePage()
  • Type URL for text file
  • Server does not return file. Bad.
  • Add app.UseStaticFiles();
  • Type URL for text file
  • Server returns file. Yeahh.

The text file should still be returned in the case that startup.cs only includes app.UserWelcomePage().

@Praburaj
Copy link

Praburaj commented Aug 6, 2014

The text file was served in the first place without app.UseStaticFiles() is because IIS staticfile module handled the request. This does not work when you move out of IIS and use WebListener/Kestrel. So registering static files middleware is necessary for a reliable/predictable static file behavior.

@richlander
Copy link
Member Author

I didn't move out of IIS in this scenario, however. The environment was IIS throughout.

@Tratcher
Copy link
Member

UseWelcomePage takes an optional argument to specify the path it should listen on (exact match). However, the default is wildcard/any. Maybe the default should be "/", the current root.

Side note, this issue should be moved to the Diagnostics repo.

@Tratcher
Copy link
Member

This issue was moved to aspnet/Diagnostics#51

@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants