ASP.NET 2.0文件在一个文件夹中工作,但不在另一个文件夹中

时间:2010-03-14 17:51:38

标签: asp.net iis-6 permissions frameworks asp.net-2.0

我为客户端创建了一个ASP.NET应用程序,所有文件都在D驱动器的文件夹中。

现在是时候开始制作,所以我将所有文件和文件夹复制到同一驱动器上现有的经典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. 

感谢您的帮助,

史蒂夫

3 个答案:

答案 0 :(得分:0)

有些值得检查的事情:

  • 确保IIS工作进程可以访问文件所在文件夹的文件夹权限
  • 如果文件位于文件夹中 - 该文件夹在IIS中设置为虚拟目录,并且您已单击IIS控制面板中的“创建”按钮来创建应用程序。

答案 1 :(得分:0)

您是否确保正确配置了工作进程帐户。尝试在C:\Windows\Microsoft.NET\Framework\v2.0.50727文件夹中运行以下内容:

  

aspnet_regiis -ga <worker_process_account_name>

答案 2 :(得分:0)

感谢大家的所有建议和帮助。由于没有任何工作,对我没有任何意义,我决定重新安装框架,现在一切都很好。

史蒂夫