It is an error to use a section registered allowDefinition=’MachineToApplica

來源:互聯網
上載者:User

今天遇到了這個錯誤。Parser   Error   Message:   It   is   an   error   to   use   a   section   registered   allowDefinition='MachineToApplication'   beyond   application   level.   This   error   can   be   caused   by   a   virtual   directory   not   being   configured   as   an   application   in   IIS.”

發現是在web.config中多定義了一個 <authentication mode="Windows"/>

將其蔽掉,ok。

在msdn上的英文解釋:

 Q:   We   have   a   fully   patched   IIS   5   server   and   are   receiving   the   following   error   “Parser   Error   Message:   It   is   an   error   to   use   a   section   registered   allowDefinition='MachineToApplication'   beyond   application   level.   This   error   can   be   caused   by   a   virtual   directory   not   being   configured   as   an   application   in   IIS.”   Can   you   explain   what   this   means?  
   
  A:   I   love   these   verbose   Asp.net   error   messages!   They   often   direct   you   to   the   solution   as   well   as   describe   the   problem.   You’ll   see   this   error   when   your   Asp.net   application   is   configured   such   that   it   uses   a   feature   like   <authentication   mode../>   or   <sessionState..>   that   requires   an   “Application”   be   defined   in   the   metabase,   and   that   definition   is   missing.   You   can   correct   this   by   either   removing   such   settings   from   your   web.config   files,   or   by   clicking   “Create”   on   the   Home   Directory,   Virtual   Directory,   or   Directory   properties   tab   of   a   web   site,   virtual   directory,   or   directory,   respectively.   This   location   will   require   at   least   the   Scripts   Only   permission   and   Read   permissions   as   well.

 

說 像<authentication   mode../>   or   <sessionState..>  這樣的東東需要一個Application中繼資料。 但是你卻沒有定義。解決方案是:要不你就把你web.config中的這樣的東西去掉,要不你就在  Home   Directory,   Virtual   Directory,   or   Directory   properties   那裡建立一個對應的web site,虛擬目錄和目錄。那些東西至少要有Script訪問級和Read的許可權。

聯繫我們

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