{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "AllowedHosts": "*", "ApplicationUrls": "http://localhost:XXX", "Endpoints": { "WebApp": { "Url": "http://localhost:XXX" } } }
app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); });
确保您的控制器和视图文件已正确命名,并且已添加正确的代码以处理请求。
如果问题仍然存在,请尝试重新构建并重新启动应用程序。
如果问题仍然存在,请检查您的防火墙和代理设置以确保它们不会阻止应用程序的请求。