Application is running inside IIS process but is not configured to use IIS server.

Host.CreateDefaultBuilder(args)
                .UseUnityServiceProvider()
                .ConfigureWebHostDefaults(webBuilder =>
                {
    
    
                    webBuilder.UseKestrel((context, options) =>

to

Host.CreateDefaultBuilder(args)
                .UseUnityServiceProvider()
                .ConfigureWebHostDefaults(webBuilder =>
                {
    
    
                    webBuilder.ConfigureKestrel((context, options) =>

UseKestrel to ConfigureKestrel

或者:

去该项目的
Properties/launchSettings.json

"profiles": {
    
    
        "IIS Express": {
    
    
        },
        "AA.BB.CC": {
    
    
            
        }}

下的AA.BB.CC的前面点击运行


或者
rider 右上角这里,选中你的项目运行
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_27093891/article/details/128901494
IIS