2013-02-20 40 views
0

我一個嘗試添加新的母版頁中的新鮮項目拋出「添加新項目」,加上我有這樣的錯誤‘Data at the root level is invalid. Line 1. Position 1’ 如何解決這個好嗎?添加主頁錯誤?

我的web.config

<?xml version="1.0"?> 

<!-- 
    For more information on how to configure your ASP.NET application, please visit 
    http://go.microsoft.com/fwlink/?LinkId=169433 
    --> 

<configuration> 

    <system.web> 
     <compilation debug="false" targetFramework="4.0" /> 
    </system.web> 

</configuration> 
+0

你試過關閉Visual Studio並重新打開它嗎? – 2013-02-20 13:47:05

+0

是每次同樣的錯誤 – Saqi 2013-02-20 13:47:42

+0

是您的母版頁成功添加到項目中? – 2013-02-20 13:48:14

回答

0

好吧,我可以重現你的錯誤在我的環境。 ,如果你在你的項目中一個無效的XML文件的問題發生。也許在web.config。

你能否證實,在你的項目中的XML文件是很好形成?嘗試使用IE打開XML文件並確保沒有錯誤。

+0

我的項目超級新鮮,沒有任何其他文件,我添加的是主頁,這是錯誤的! – Saqi 2013-02-20 14:06:16