Publish ASP.NET Core 6 Website to IIS - Error 500 (possibly SPA related)

Job ID: 38022605

Budget: $10 – $50 USD

I'm encountering an "Error 500" on my ASP.NET Core 6 website with React. Sometimes it is blank page also.
Application works when starting from Visual Studio, but doesnt work when publishing on IIS on the same computer.

Event Log (Problem with SPA):
system.invalidoperationexception: 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.

You must work online through TeamViewer, AnyDesk or something similar.

IT IS NOT JUST PUBLISH TO FOLDER.
Maybe you need to change Program.cs or Startup.cs. Possibly issue is related because of Windows authentication must be turned on.
Should not be long task for someone who has experience with this kind of problem.

Explain in your bid that you understand what is problem.