My project base on net6.0 was working fine with IIS launch setting but when i added serivce
services.AddRazorPages().AddRazorRuntimeCompilation();
It stop working on IIS but Working on IIS Express and Self host.
My project base on net6.0 was working fine with IIS launch setting but when i added serivce
services.AddRazorPages().AddRazorRuntimeCompilation();
It stop working on IIS but Working on IIS Express and Self host.
You can try to add this configuration setting to your .csproj file and then republish your site to the server.
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile>