Файлы ASP.NET 2.0 работают в одной папке, но НЕ в другой - PullRequest
2 голосов
/ 14 марта 2010

Я создал приложение 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. 

Спасибо за помощь,

Steve

Ответы [ 3 ]

0 голосов
/ 16 марта 2010

Убедитесь, что учетная запись рабочего процесса настроена правильно. Попробуйте выполнить следующее в папке C:\Windows\Microsoft.NET\Framework\v2.0.50727:

aspnet_regiis -ga <worker_process_account_name>

0 голосов
/ 18 марта 2010

Спасибо всем за все ваши предложения и помощь. Поскольку ничего не помогало и не имело для меня смысла, я решил переустановить фреймворк, и теперь все в порядке.

Стив

0 голосов
/ 14 марта 2010

Некоторые вещи, которые стоит проверить:

  • Разрешения для папки, обеспечивающие доступ рабочего процесса IIS к папке, в которой находятся файлы
  • Если файлы находятся в папке,папка настроена как виртуальный каталог в IIS, и вы нажали кнопку «Создать» на панели управления IIS, чтобы создать приложение.
...