簡體   English   中英

無法通過VS2013在IIS Express上運行.net 3.5網頁

[英]Cannot run .net 3.5 web page on IIS Express thru VS2013

我最近升級到了VS2013。 我在Windows 8企業版計算機上運行。 我能夠創建一個簡單的網站並將其編譯為.net 4.0,並且可以與IIS Express正常工作。 但是,在測試.net 4.0網頁后,我立即創建了一個新的.net 3.5,並在嘗試編譯解決方案時收到以下錯誤:

Error   1   An assembly with the same identity 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Try removing one of the duplicate references.   

當我查看c:\\ users {userName} \\ Documents \\ IISExpress \\ config \\ applicationhost.config時,它顯示

    <site name="WebSite2" id="9">
        <application path="/" applicationPool="Clr2IntegratedAppPool">
            <virtualDirectory path="/" physicalPath="C:\Users\{userName}\Documents\Visual Studio 2013\WebSites\WebSite2" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:63681:localhost" />
        </bindings>
    </site>

任何幫助是極大的贊賞。

有兩個要點:

  1. Windows 8默認沒有安裝.NET Framework 3.5。 您需要在“控制面板”>“程序和功能”下添加它
  2. IIS工作進程(應用程序池, w3wp.exe )僅可以一次使用CLR的單個版本(有兩種選擇: 2.04.0 ,所述2.0 CLR包括版本3.5的.NET Framework)

我沒有IIS Express的經驗,但是大概可以將應用程序池配置為使用特定版本的框架,並在IIS配置文件中查找<applicationPools>元素。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM