受欢迎的博客标签

Nopcommerce 3.9发布后出现运行错误的解决实战记录

Published

 

Nopcommerce 3.9及以下版本 2016.05.29

 

一、错误现象 Nopcommerce在本地开发环境没问题,但是发布到服务器出现错误 

We're sorry, an internal error occurred. Our supporting staff has been notified of this error and will address the issue shortly. We apologize for the inconvenience. Please try clicking your browsers 'back' button or try reloading the home page. If you continue to receive this message, please try again in a little while. Thank you for your patience.

 

二、查找原因  

 1.查看Nopcommerce后台日志  

 打开nopcommere后台查看日志,未看到记录出错信息

2.查看系统日志: 打开windows系统日志,事件查看器显示错误信息 

Event code: 3007 Event message: 发生了编译错误。 Event time: 2016/5/29 7:42:03 Event time (UTC): 2016/5/28 23:42:03 Event ID: c948ce8a81e04112bc6115607315bda8 Event sequence: 3 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/12/ROOT-53-131089525209463914 Trust level: Full Application Virtual Path: / Application Path: x:\xxxx\freeboygirlcom\ Machine name: WIN-BEIVRTNBN01 Process information: Process ID: 13232 Process name: w3wp.exe Account name: IIS APPPOOL\www.freeboygirl.com Exception information: Exception type: HttpCompileException Exception message: (0): error CS0016: 未能写入输出文件“x:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\b6a9cf74\22d1efc3\App_global.asax.pqe_m1tz.dll”--“拒绝访问。 ” 在 System.Web.Compilation.AssemblyBuilder.Compile() 在 System.Web.Compilation.BuildProvidersCompiler.PerformBuild() 在 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) 在 System.Web.Compilation.BuildManager.CompileGlobalAsax() 在 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() 在 System.Web.Compilation.BuildManager.CallAppInitializeMethod() 在 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) Request information: Request URL: http://www.freeboygirl.com/ Request path: / User host address: 11x.19x.24.78 User: Is authenticated: False Authentication Type: Thread account name: IIS APPPOOL\www.freeboygirl.com Thread information: Thread ID: 103 Thread account name: IIS APPPOOL\www.freeboygirl.com Is impersonating: False Stack trace: 在 System.Web.Compilation.AssemblyBuilder.Compile() 在 System.Web.Compilation.BuildProvidersCompiler.PerformBuild() 在 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) 在 System.Web.Compilation.BuildManager.CompileGlobalAsax() 在 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() 在 System.Web.Compilation.BuildManager.CallAppInitializeMethod() 在 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) Custom event details: :未能写入输出文件“c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\106f9ae8\cc0e1169\App_global.asax.haz99mum.dll”--“拒绝访问。 ”错误

  三、解决方法:  

1,通常的解决方法:原因是由于系统目录下的Temp目录无相应的权限所致,具体操作如下:C:\Windows\temp-->属性-->安全-->编辑-->添加NETWORK SERVICE用户的读写权限就可以解决.  

2,打开服务器系统c盘,打开window, 右键temp 属性 安全 编辑 添加IIS_IUSRS 用户控制权限添加修改和写入权限即可。  .