iis 發佈的項目提示內容格式錯誤

Client found response content type of 'text/html',but expected 'text/xml'

一. 需要把對應的程序池

由於項目需要.NET v2.0 的的因此需要設置正確的.net CLR 版本已經託管通道模式,

更改設置後,仍然提示相同的失敗,

因爲安裝framework是在安裝iis之前,asp.net沒有註冊造成的

二. 註冊對應的asp.net

在cmd 裏面執行:C:/Windows/Microsoft.NET/Framework/v2.0.50727/aspnet_regiis -i

正常會是成功的,

但是有報錯提示失敗:

Note pkgmgr.exe has been deprecated please update your scripts to use dism.exe

三. 使用 dism.exe

新的windows server 環境可能沒有對應的工具

update windows 到最新版本,然後,cmd 裏面執行下面語句就可以了

 DISM.exe /Online /Cleanup-image /Scanhealth

DISM.exe /Online /Cleanup-image /Restorehealth

參考網站:

https://answers.microsoft.com/en-us/windows/forum/apps_windows_10-winapps/error-note-pkgmgrexe-has-been-deprecated-please/57e1cc4b-efda-4e00-9ae8-7a6735efb0c2

https://blog.csdn.net/xiaoguang44/article/details/6443107

重新向上執行就可以了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章