The SPA default page middleware could not return the default page '/index.html' because it was not found #216

Closed
opened 2025-08-09 17:15:26 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @gursin87 on 1/23/2018

I have published the app to Azure app service from visual studio. I am getting the following error when trying to browse to the application:

2018-01-23 16:27:24.118 +00:00 [Error] Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware: An unhandled exception has occurred: The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request.
Your application is running in Production mode, so make sure it has been published, or that you have built your SPA manually. Alternatively you may wish to switch to the Development environment.

I copied the file index.htm to the folder "ClientApp/dist/index.htm". Now I am not getting the exception. But the page just renders the following:

image

Would appreciate if you could help me with what the issue might be.

Thanks

*Originally created by @gursin87 on 1/23/2018* I have published the app to Azure app service from visual studio. I am getting the following error when trying to browse to the application: 2018-01-23 16:27:24.118 +00:00 [Error] Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware: An unhandled exception has occurred: The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request. Your application is running in Production mode, so make sure it has been published, or that you have built your SPA manually. Alternatively you may wish to switch to the Development environment. I copied the file index.htm to the folder "ClientApp/dist/index.htm". Now I am not getting the exception. But the page just renders the following: ![image](https://user-images.githubusercontent.com/18685917/35289771-51ce0058-008e-11e8-8687-961a976dd657.png) Would appreciate if you could help me with what the issue might be. Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#216
No description provided.