asp.net 网站目录所需的权限 Server Application Unavailable

打开ASP.NET 网页出现:
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.0.50727.0
事件种类: 无
事件 ID: 1088
日期:  2010-4-6
事件:  21:44:43
用户:  N/A
计算机: XXXXXXX
描述:
Failed to execute request because the App-Domain could not be created. Error: 0x80070005 拒绝访问。 

事件类型: 错误
事件来源: ASP.NET 2.0.50727.0
事件种类: 无
事件 ID: 1334
日期:  2010-4-6
事件:  21:44:43
用户:  N/A
计算机: 4B9JBIX9M9UC98G
描述:
Failed to initialize the AppDomain:/LM/W3SVC/318331351/Root/en

Exception: System.IO.FileLoadException

Message: Could not load file or assembly ‘System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. 拒绝访问。

StackTrace:    at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstance(String assemblyName, String typeName)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

解决办法,该问题主要是由于网站文件夹权限问题引起,该网站文件夹下添加下面几个用户可以解决。

ASP.NET
IWAM_XXXXXXXX  该用户为默认的IIS站点用户。可以换成其他的。
Local_Service
Network_Service
System

发表评论

邮箱地址不会被公开。 必填项已用*标注

click to changeSecurity Code