CS0006: Metadata file Nop.Plugin.DiscountRules.BillingCountry.dll' could not be found

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
Has anyone run into this error before?  Why is the server or IIS running csc?  It looks like a dependency issue but it is intermittent.

Version: nopCommerce 2.3 (No Source)

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0006: Metadata file 'D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.BillingCountry.dll' could not be found

Source Error:


[No relevant source lines]

Source File:    Line: 0


Show Detailed Compiler Output:


C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Feed.Froogle.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Shipping.FixedRateShipping.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.ExternalAuth.OpenId.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.PurchasedOneProduct.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.AuthorizeNet.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.AuthorizeNet.XmlSerializers.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Tax.StrikeIron.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\App_global.asax.wf4ipinj.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\850c8e13\ae62cd4a_10dacc01\AutoMapper.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.ExternalAuth.Twitter.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\a86e98ff\ee132f4d_10dacc01\EPPlus.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.GoogleCheckout.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.SMS.Verizon.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Facebook.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.ExchangeRate.McExchange.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.HasAllProducts.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Linq.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\fa244952\0298d356_10dacc01\Nop.Web.Framework.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.Manual.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\6d082ec3\f024d557_10dacc01\RouteDebugger.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.CashOnDelivery.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Tax.CountryStateZip.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Razor\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.Razor.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Shipping.Fedex.XmlSerializers.dll" /R:"D:\hosting\6177415\html\Plugins\bin\SevenSpikes.Nop.Core.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\f8b05d46\d8bd6749_10dacc01\Autofac.Configuration.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.ShippingCountry.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\47f55eda\2a9ca657_10dacc01\Recaptcha.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Abstractions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Abstractions.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\aed4156f\38d18e4a_10dacc01\Autofac.Integration.Mvc.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Tax.Free.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\277812ff\ecdfca55_10dacc01\Nop.Services.XmlSerializers.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Routing\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Routing.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\0d41b47a\0010a84d_10dacc01\FluentValidation.Mvc.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Helpers\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.Helpers.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.HadSpentAmount.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\01734f4e\a2b32e4a_10dacc01\Autofac.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.SMS.Clickatell.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"D:\hosting\6177415\html\Plugins\bin\SevenSpikes.Nop.Plugins.CategoriesHeaderMenu.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"D:\hosting\6177415\html\Plugins\bin\SevenSpikes.Nop.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Widgets.GoogleAnalytics.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.CheckMoneyOrder.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Shipping.CanadaPost.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\2abe8be0\e0a69d59_10dacc01\WebActivator.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\636bbfdf\5eeb5953_10dacc01\Nop.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Widgets.LivePersonChat.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\1bef5626\a0139350_10dacc01\MvcMiniProfiler.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.PayPalDirect.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Shipping.Fedex.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Newtonsoft.Json.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\89776bfb\fa8b8f4f_10dacc01\MvcContrib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"D:\hosting\6177415\html\Plugins\bin\LinqToTwitter.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.ExternalAuth.Facebook.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\8de5ce55\82535d55_10dacc01\Nop.Services.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.PurchaseOrder.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.PurchasedAllProducts.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Misc.WebServices.dll" /R:"D:\hosting\6177415\html\Plugins\bin\GCheckout.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.ExchangeRate.EcbExchange.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.BillingCountry.dll" /R:"D:\hosting\6177415\html\Plugins\bin\DotNetOpenAuth.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.HasOneProduct.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\10824234\367f8f4d_10dacc01\FluentValidation.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\e9788f6b\4eb4c853_10dacc01\Nop.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.CustomerRoles.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.PayInStore.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\c7561226\5ad26352_10dacc01\Nop.Admin.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\26284d4e\3a75504c_10dacc01\EntityFramework.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Shipping.ByWeight.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Feed.PriceGrabber.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Shipping.AustraliaPost.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\eb50ecb3\9c8e585a_10dacc01\Telerik.Web.Mvc.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Feed.Become.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\9e33768d\a6523c53_10dacc01\itextsharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Tax.FixedRate.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Shipping.UPS.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Shipping.USPS.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\8d132132\dc5f8558_10dacc01\System.Data.SqlServerCe.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Payments.PayPalDirect.XmlSerializers.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\38488434\5a0ec74e_10dacc01\Microsoft.Web.Mvc.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Mvc\v4.0_3.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll" /R:"D:\hosting\6177415\html\Plugins\bin\SevenSpikes.Nop.Framework.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\assembly\dl3\18d2d2de\c411c056_10dacc01\Nop.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Web.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Web.Infrastructure.dll" /R:"D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.Tax.StrikeIron.XmlSerializers.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"D:\hosting\6177415\html\Plugins\bin\SevenSpikes.Nop.Plugins.Core.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\App_Web_list.cshtml.edd98733.iteciz00.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror-  "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\App_Web_list.cshtml.edd98733.iteciz00.0.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db7cb6b0\5d5baa3c\App_Web_list.cshtml.edd98733.iteciz00.1.cs"


Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
Copyright (C) Microsoft Corporation. All rights reserved.

error CS0006: Metadata file 'D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.BillingCountry.dll' could not be found
Il y a 12 ans
I finally got far enough into the administration and found this error in the log.

Looks like the nearest nopCommerce function call is Nop.Web.Framework.Themes.ThemeableBuildManagerViewEngine.FileExists(ControllerContext controllerContext, String virtualPath) which is calling System.Web.Compilation.BuildManager.GetObjectFactory(virtualPath, false)

Log level:  Error  

Short message:  (0): error CS0006: Metadata file 'D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.BillingCountry.dll' could not be found  

Full message:
System.Web.HttpCompileException (0x80004005): (0): error CS0006: Metadata file 'D:\hosting\6177415\html\Plugins\bin\Nop.Plugin.DiscountRules.BillingCountry.dll' could not be found at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at Nop.Web.Framework.Themes.ThemeableBuildManagerViewEngine.FileExists(ControllerContext controllerContext, String virtualPath) in f:\Own\NopCommerce\Sources\src\Presentation\Nop.Web.Framework\Themes\ThemeableBuildManagerViewEngine .cs:line 14 at Nop.Web.Framework.Themes.ThemeableVirtualPathProviderViewEngine.GetPathFromGeneralName(ControllerContext controllerContext, List`1 locations, String name, String controllerName, String areaName, String theme, String cacheKey, String[]& searchedLocations) in f:\Own\NopCommerce\Sources\src\Presentation\Nop.Web.Framework\Themes\ThemeableVirtualPathProviderViewEngine.cs:line 95 at Nop.Web.Framework.Themes.ThemeableVirtualPathProviderViewEngine.GetPath(ControllerContext controllerContext, String[] locations, String[] areaLocations, String locationsPropertyName, String name, String controllerName, String theme, String cacheKeyPrefix, Boolean useCache, String[]& searchedLocations) in f:\Own\NopCommerce\Sources\src\Presentation\Nop.Web.Framework\Themes\ThemeableVirtualPathProviderViewEngine.cs:line 61 at Nop.Web.Framework.Themes.ThemeableVirtualPathProviderViewEngine.FindView(ControllerContext controllerContext, String viewName, String masterName, Boolean useCache) in f:\Own\NopCommerce\Sources\src\Presentation\Nop.Web.Framework\Themes\ThemeableVirtualPathProviderViewEngine.cs:line 179 at System.Web.Mvc.ViewEngineCollection.<>c__DisplayClassc.<FindView>b__a(IViewEngine e) at System.Web.Mvc.ViewEngineCollection.Find(Func`2 lookup, Boolean trackSearchedPaths) at System.Web.Mvc.ViewEngineCollection.FindView(ControllerContext controllerContext, String viewName, String masterName) at System.Web.Mvc.ViewResult.FindView(ControllerContext context) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d() at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Il y a 12 ans
The problem is in the Nop.Core.Plugins.PluginManager.

The application clears the Plugins/bin folder every time the ASP.NET app starts.  Godaddy probably has IIS set to restart the application when the app pool is recycled.  They mention on the IIS management screen that they automatically recycle the app pool frequently.

When the application is restarted, the Nop.Core.Plugins.PluginManager::Initialize function is called because of the [assembly: PreApplicationStartMethod(typeof(PluginManager), "Initialize")] attribute.  This needs to happen because the PluginManager loads the DLL assemblies.  Unfortunately with hosting companies, you don't have control over the configuration of the hardware.

The Problem
The Nop.Core.Plugins.PluginManager::Initialize function deletes all of the DLLs in the Plugins/bin folder because it figures the application is being started and won't be restarted frequently.  This is what is causing the access denied errors and the could not be found errors.

Solution
Delete or comment out the following code in Nop.Core.Plugins.PluginManager::Initialize
   //clear out shadow copied plugins
   foreach (var f in binFiles)
   {
       Debug.WriteLine("Deleting " + f.Name);
       try
      {
           File.Delete(f.FullName);
      }
      catch (Exception exc)
      {
          Debug.WriteLine("Error deleting file " + f.Name + ". Exception: " + exc);
      }
    }

And modify the code in Nop.Core.Plugins.PluginManager::InitializeMediumTrust function.
1. Change if (shadowCopiedPlug.CreationTimeUtc.Ticks == plug.CreationTimeUtc.Ticks)
    to if (shadowCopiedPlug.CreationTimeUtc.Ticks >= plug.CreationTimeUtc.Ticks)
    == to >= since we only want the newest DLL.
2. Add else
          {
               Debug.WriteLine("New Plugin found; Deleteing old fild from Plugins/bin: '{0}'", shadowCopiedPlug.Name);
               File.Delete(shadowCopiedPlug.FullName);
          }

to look like this.
   if (shadowCopiedPlug.Exists)
   {
        if (shadowCopiedPlug.CreationTimeUtc.Ticks >= plug.CreationTimeUtc.Ticks)
        {
               Debug.WriteLine("Not copying; files appear identical: '{0}'", shadowCopiedPlug.Name);
               shouldCopy = false;
        }
        else
        {
               Debug.WriteLine("New Plugin found; Deleteing old fild from Plugins/bin: '{0}'", shadowCopiedPlug.Name);
               File.Delete(shadowCopiedPlug.FullName);
        }
    }

The above will only delete the DLLs that are new so that when the DLLs are copied, there is no way for it to cause an access denied error.

NOTE: For new installations you may still get errors, but you should be able to recycle the application pool.  I haven't tried the above code on a new installation.  If you do get errors, you should be able to manually copy the DLLs into the Plugins/bin folder as a work around, but I am guessing that the errors would be minimized and not occur frequently.  This may also speed up the initialization a touch.
Il y a 12 ans
This issue seems to be fixed. Can anybody who uses GoDaddy hosting get the latest version of nopCommerce here (upcoming 2.40 release) and test it? Does it work fine? Please find more info about the fix here
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.