XP系统下IIS服务器程序不可用解决方法

来源:互联网 发布:select2变更数据 编辑:程序博客网 时间:2024/04/27 14:53
开发的项目在VWD开发环境下就可以运行,没有一点错,但是放到IIS浏览的时候就出现以下错误:

服务器应用程序不可用
您试图在此 Web 服务器上访问的 Web 应用程序当前不可用。请点击 Web 浏览器中的“刷新”按钮重试您的请求。

管理员注意事项: 详述此特定请求失败原因的错误信息可在 Web 服务器的系统事件日志中找到。请检查此日志项以查明导致该错误发生的原因。

我查询日志后,出现一个警告一个错误
警告是:
未能初始化 AppDomain:/LM/W3SVC/8263/Root (8263也有可能是别的数字)

Exception: System.IO.FileLoadException
Message: 未能加载文件或程序集“System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。拒绝访问。
StackTrace: 在 System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
在 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
在 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
在 System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
在 System.Activator.CreateInstance(String assemblyName, String typeName)
在 System.AppDomain.CreateInstance(String assemblyName, String typeName)
在 System.AppDomain.CreateInstance(String assemblyName, String typeName)
在 System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
在 System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持

错误是:
由于无法创建应用程序域,因此未能执行请求。错误: 0x80070005 拒绝访问
解决:系统是XP。由于我是先装VWD2010,然后装了IIS5.1(没错,这就是原因)

需要在IIS中重新注册.net

运行:系统盘\windows\microsoft.net\framework\v4.0.30319(此处为版本号)\aspnet_regiis.exe -i 注:版本号自己填写--可以到framework目录下找一下选最大的一个

执行后会提示

开始安装 ASP.NET (4.0.30319)。
.....................................
ASP.NET (4.0.30319)安装完毕。

现在 .aspx文件就可以在IIS中运行了

原创粉丝点击