一直以为IIS的错误信息就在网站log里,看了半天也看不出个什么来。后来忽然醒悟:“Can be found in the application event log of the web server",于是打开了windows的事件查看器,在程序日志里,发现了这样的提示:
事件类型: 警告事件来源: ASP.NET 2.0.50727.0事件种类: 无事件 ID: 1073日期: 2007-2-10事件: 10:05:25用户: N/A计算机: CNTQ-1描述:Failed to initialize the AppDomain:/LM/W3SVC/214077270/Root
Exception: System.IO.FileLoadExceptionMessage: 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.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)
有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
事件类型: 错误事件来源: ASP.NET 2.0.50727.0事件种类: 无事件 ID: 1088日期: 2007-2-10事件: 10:05:25用户: N/A计算机: CNTQ-1描述:Failed to execute request because the App-Domain could not be created. Error: 0x80070005 拒绝访问。
有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
有了具体的错误信息就好办多了,因为我们有伟大的互连网啊,而且,互连网上有google等这样伟大的搜索引擎啊,问题是这样解决的:
解决办法:在该web sites的virtual directory下,将Permissions设置一下,里面应包含ASP.NETIWAM_MachineNameLocal_ServiceNetwork_ServiceSystem而且权限要设置为write & read.设置后,一切运行正常.
Server Application Unavailable是一个太笼统的错误提示了,有n多的原因可以引起Application Unavailable,所以,找到具体的错误信息才是解决问题的关键!