Server cannot set content type after HTTP headers have been sent

后端 未结 6 991
离开以前
离开以前 2020-12-20 15:42

I get an error (Server cannot set content type after HTTP headers have been sent.) on the following code (ContentType line). What should I change?



        
6条回答
  •  礼貌的吻别
    2020-12-20 16:09

    I had the same problem and the following solution solved the problem, run a response.ClearHeaders(); before run response.AddHeader(

提交回复
热议问题