2010-03-14 66 views
2

我爲客戶端創建了ASP.NET應用程序,並且所有文件都位於D驅動器的文件夾中。ASP.NET 2.0文件在一個文件夾中工作,但不在另一個文件夾中

現在是時候開始生產了,所以我將所有文件和文件夾複製到同一驅動器上的現有經典ASP文件夾中。

當我瀏覽到應用程序時,它無法啓動。

我可以看到的唯一區別是開發站點不需要像生產站點那樣的HTTPS。

我也確保兩個文件夾上的所有權限相同。 我也確保GAC使用aspnet_regiis工具讀取權限。

我在調試知識的末尾,有人可以幫我解決問題。

以下是我從應用程序事件日誌中獲得的錯誤消息。

Failed to initialize the AppDomain:/LM/W3SVC/3/Root 

Exception: System.Configuration.ConfigurationErrorsException 
Message: Exception of type 'System.Configuration.ConfigurationErrorsException' was thrown. 
StackTrace: at System.Web.Configuration.ErrorRuntimeConfig.ErrorConfigRecord.System.Configuration.Internal.IInternalConfigRecord.GetLkgSection(String configKey) 
    at System.Web.Configuration.RuntimeConfigLKG.GetSectionObject(String sectionName) 
    at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index) 
    at System.Web.Configuration.RuntimeConfig.get_HostingEnvironment() 
    at System.Web.Hosting.HostingEnvironment.StartMonitoringForIdleTimeout() 
    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) 
    at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) 
    at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters) 
    at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters) 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. 

------------------------ 
Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80131902 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. 
------------------------- 

aspnet_wp.exe (PID: 4568) stopped unexpectedly. 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. 

這裏是網絡錯誤消息:

Server Application Unavailable 
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. 

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur. 

感謝你的幫助,

史蒂夫

+2

只是爲了確保你沒有錯過顯而易見的事情:你確定你已經激活了ASP.NET(以及正確的版本)IIS嗎?你是否將該文件夾設置爲應用程序,或者至少是一個虛擬目錄? – 2010-03-14 18:05:03

+0

是的,我將應用程序複製到的是一個經典的ASP應用程序,並確保在該選項卡中啓用了ASP.NET 2.0。 謝謝您的建議。 – Steve 2010-03-14 19:34:14

回答

0

有些事情值得一試:

  • 確保IIS工作進程有權訪問文件夾中的文件夾的文件夾權限
  • 如果文件位於文件夾中 - 該文件夾在IIS中設置爲虛擬目錄,並且您已單擊了創建按鈕IIS控制面板創建一個應用程序。
+0

我已經完成了所有這些工作,實際上我已經過了頭,並且讓所有人都可以完全訪問所有文件夾,以查看我是否能夠正常工作,而沒有任何問題。我不知道該怎麼做。爲什麼一個文件夾可以工作,另一個不工作? – Steve 2010-03-16 18:34:09

0

您是否確定工作進程帳戶配置正確。嘗試運行在C:\Windows\Microsoft.NET\Framework\v2.0.50727文件夾中的以下內容:

aspnet_regiis -ga <worker_process_account_name>

+0

worker_process_account_name是應用程序運行的帳戶嗎?這是ASPNET帳戶嗎?對不起,我問,我以前從來沒有真正處理過這個問題。 – Steve 2010-03-16 13:12:10

+0

@steve - 1。打開網站屬性並點擊「主目錄」選項卡。請注意'應用程序池'的名稱(它是一個下拉列表框)。 2.打開IIS管理器樹的「應用程序池」節點,瀏覽到(1)中提到的應用程序池。右鍵單擊並打開「應用程序池」屬性,然後單擊「標識」選項卡。正在使用什麼身份? – Kev 2010-03-16 13:30:10

+0

他們使用IIS 6.o,沒有應用程序池。非常感謝您的幫助。我不知道如何解決這個謎團。 – Steve 2010-03-16 18:03:24

0

謝謝大家對你的建議和幫助。由於沒有任何工作,對我沒有任何意義,我決定重新安裝框架,現在一切都很好。

Steve

相關問題