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

302 Found responses for files that aren't found #76

Open
SkyfallWasTaken opened this issue May 21, 2024 · 3 comments
Open

302 Found responses for files that aren't found #76

SkyfallWasTaken opened this issue May 21, 2024 · 3 comments

Comments

@SkyfallWasTaken
Copy link
Contributor

If a file cannot be found, rather than using 404 Not Found, the server responds with 302 Found.
Here's an example:
image
This also ends up causing errors, such as these:
image

@Shahid-khan5
Copy link

facing the same issue

@kaleho
Copy link

kaleho commented Jul 24, 2024

I updated all the NuGet packages. After that I made the following changes:

Program.cs

I changed app.UseViteDevMiddleware(); to app.UseViteDevelopmentServer(true); if VS did not offer to fix it for you. Also, the true is for useMiddleWare which is required.

AppServiceRegistration.cs

Change using Vite.AspNetCore.Extensions; to just using Vite.AspNetCore;.

After which, everything loaded properly.

@Shahid-khan5
Copy link

Thanks. I'll try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants