2013-05-09 29 views
0

我有一個ASP.Net解決方案,我已經檢出了SVN。我已將它保存在c:\inetpub\solution-name\之下。我試圖啓動的文件位於c:\inetpub\solution-name\trunk\project-name\Default.aspx。當我訪問通過瀏覽器http://localhost/solution-name/trunk/project-name/,我得到以下錯誤:ASP.Net不會啓動 - IIS錯誤,因爲它不在根?

Server Error in '/' Application. 

Configuration Error 

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. 

Source Error: 


Line 253:  </controls> 
Line 254: </pages> 
Line 255: <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="AspNetSqlRoleProvider"> 
Line 256:  <providers> 
Line 257:  <clear/> 

我認爲這個問題可能有些事情要處理這些文件的目錄結構。我不想改變結構,因爲我需要能夠在inetpub等下有多個解決方案。

是否有IIS配置來解決這個問題?

回答

0

您需要爲IIS中的每個Asp.Net項目創建一個虛擬目錄。此外,如果你在IIS7 +上,你可以右鍵點擊文件夾並點擊「轉換爲應用程序」。要創建虛擬目錄,您可以右鍵單擊IIS中的網站,然後選擇「添加虛擬目錄」。

+0

我試着'添加虛擬目錄'。我進入了一個「別名」和「物理路徑:」(我不確定這是什麼,但我指出它是我默認項目的文件夾)。當我點擊'Test Settings'時,'Authentication'好像已經過去了,但'Authorization'返回了這個: – snoopy76 2013-05-13 20:37:41

+0

「服務器被配置爲使用通過身份驗證的內置帳戶來訪問指定的物理路徑。但是,IIS管理器無法驗證內置帳戶是否具有訪問權限。請確保應用程序池標識具有對物理路徑的讀取權限。如果此服務器加入到域中,並且應用程序池標識爲NetworkService或LocalSystem,驗證 \ $是否具有對物理路徑的讀取權限,然後再次測試這些設置。「 – snoopy76 2013-05-13 20:40:10

相關問題