日期:2014-05-17  浏览次数:20601 次

windows2003 server 上部署.netframework4.0 后出错
windows2003 server sp2 iis6.0 已经安装了netframework4.0 独立安装包 配置网站时有以下问题:

未能初始化 AppDomain:/LM/W3SVC/1220131043/Root

Exception: System.IO.FileLoadException

Message: 未能加载文件或程序集“System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。拒绝访问。

StackTrace: 在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
  在 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
  在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
  在 System.Reflection.RuntimeAssembly.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.InternalCreateInstanceWithNoSecurity(String assemblyName, String typeName)
  在 System.AppDomain.InternalCreateInstanceWithNoSecurity(String assemblyName, String typeName)
  在 System.Activator.CreateInstance(AppDomain domain, 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 的帮助和支持


我本机的环境是可以运行的,看样子是windows2003 server上新装的环境下少了某个dll 还是要更新哪个补丁?

------解决方案--------------------
看错误是权限问题...貌似...
------解决方案--------------------
必须指定是 asp.net账户的权限吗?
好像是。
我记得虚拟目录右键里面有一个添加DLL的地址 把4.0framework地址添加进去
在找找看
------解决方案--------------------
救命啊啊啊