net::ERR_INVALID_HTTP_RESPONSE error after post request with Angular 7

后端 未结 3 1978
耶瑟儿~
耶瑟儿~ 2021-02-13 11:25

I am working on small web application and I am using angular 7 and asp.net core web api as a back end. I am trying to make http post request with angular. My service returns str

3条回答
  •  执念已碎
    2021-02-13 11:57

    I figured out where the problem is located. It's on the server side. Did you use ASP.NET Core 2.2 ? After downgrading to 2.1, it's finally working !

    
    
      
        netcoreapp2.1
        InProcess
      
    
      
        
        
        
        
        
      
    
      
        
      
    
    

    But I can't understand why. The only thing that changed is in one header, the Server header. It changed from Microsoft-IIS/10.0 (2.2) to Kestrel (2.1)

提交回复
热议问题