天天看點

位置引起的錯誤

今天在配置一個項目的時候,花了挺長時間配置完成,然後一啟動項目,懵了,啟動報錯:錯誤顯示

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Only one element allowed per config file and if present must be the first child of the root element.

Unrecognized configuration section loggingProvider

最後糾結了半天,查了很多錯誤原因,因為沒有直接搜尋configSections錯誤,而是直接查詢的錯誤,導緻很長時間沒有查出真正的原因,最後拿了别的web.config進行對比發現的位置是靠在最前面的。調整好了,再運作,成功了。後來在網上查詢說,節點前不允許有其它節點。是以當我把它放在中間的時候則報上面的錯誤。

繼續閱讀