IIS7.0發布Web服務-0001

來源:互聯網
上載者:User

標籤:style   blog   class   c   ext   color   

配置錯誤 不能在此路徑中使用此配置節。如果在父層級上鎖定了該節,便會出現這種情況。鎖定是預設設定的 (overrideModeDefault="Deny"),或者是通過包含 overrideMode="Deny" 或舊有的 allowOverride="false" 的位置標記明確設定的。  
設定檔 \\?\X(盤符):\目錄名\目錄名\web.config
<system.webServer>
        <handlers>
            <add name="isa_rewrite" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
        </handlers>
 </system.webServer>
配置源
  104:   </modules>
  105:  <handlers>               ‘//(這裡紅色標記)
  106:    <add name="isa_rewrite" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness32" />

 出現這 個錯誤是因為 IIS 7 採用了更安全的 web.config 管理機制,預設情況下會鎖住配置項不允許更改。要取消鎖定可以以管理員身份運行命令列 %windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers 。其中的 handlers 是錯誤資訊中紅字顯示的節點名稱。

如果modules也被鎖定,可以運行%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules

注意:要以管理員身份運行才可以,預設不是管理員身份,方法,在開始菜單中的搜尋程式與檔案輸入CMD,就會在上方出現一個CMD.EXE,在這個CMD.EXE檔案上點擊鍵,選擇“以管理員身份運行”,開啟命令列視窗,輸入以上命令即可。
另外,如果使用Asp.net的朋友,在安裝IIS7的時候一定記得勾選Asp.net,預設不選,也會出現類似的錯誤資訊

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.