WCF分布式開發常見錯誤(29)

來源:互聯網
上載者:User

WCF分布式開發常見錯誤(29):Unrecognized attribute 'targetFramework' (未識別的屬性'targetFramework' )

我在使用VS2010 和.NET Framework 4.0 。開發了一個簡單的WCF服務,在部 署到IIS6的時候,出現了這個錯誤。

Unrecognized attribute 'targetFramework' .

【1】錯誤資訊:

WCF服務的設定檔的資訊如下:

<compilation debug="true" targetFramework="4.0">
<assemblies>
</assemblies>
</compilation>

【2】錯誤截圖:

【3】原因分析:

這個錯誤是由於,.NET Framwork的版本不對導致的,無法識別出設定檔中 的節點。

【4】解決辦法:

在網站屬性的asp.NET裡設定版本為.NET In IIS > Right click on WebSite > Properties > ASP.NET > Version > "4.0.21006" not 2.0。

IIS6> 選擇網站-> 右鍵-> 屬性-> ASP.NET -> 版本-> "4.0.21006" 。如圖所示:

參考資料:

1.http://forums.asp.net/t/1491204.aspx

2.http://social.microsoft.com/Forums/zh- CN/wcfzhchs/thread/663531f6-5466-4c2b-8450-73135137756b/? prof=required

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.