Paypal DLL access error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 3 ans
Can anyone shed light on this error. The site crashed stating that access was denied to the Nop.Plugin.Payments.PayPalStandard.dll. On looking more closely at the error output I see a filepath that is invalid for our server. It begins "C:\andrei\nopCommerce_4.30_Source\Presentation" where did that come from?
Restarting IIS got the site back online.
Here is the log file:
Application: w3wp.exe
CoreCLR Version: 4.700.20.11803
.NET Core Version: 3.1.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception: Plugin 'PayPal Standard'. Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.
Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.

---> System.Exception: Plugin 'PayPal Standard'. Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.
---> System.UnauthorizedAccessException: Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.
   at System.IO.FileSystem.DeleteFile(String fullPath)
   at System.IO.File.Delete(String path)
   at Nop.Core.Infrastructure.NopFileProvider.DeleteFile(String filePath) in C:\andrei\nopCommerce_4.30_Source\Libraries\Nop.Core\Infrastructure\NopFileProvider.cs:line 152
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.ShadowCopyFile(INopFileProvider fileProvider, String assemblyFile, String shadowCopyDirectory) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 105
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.PerformFileDeploy(ApplicationPartManager applicationPartManager, String assemblyFile, String shadowCopyDirectory, NopConfig config, INopFileProvider fileProvider) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 207
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 533
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 569
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 580
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfiguration configuration, IWebHostEnvironment webHostEnvironment) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 77
   at Nop.Web.Startup.ConfigureServices(IServiceCollection services) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web\Startup.cs:line 42
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Nop.Web.Program.Main(String[] args) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web\Program.cs:line 11
Il y a 3 ans
brian@brianwatson.co.uk wrote:
... filepath that is invalid for our server. It begins "C:\andrei\nopCommerce_4.30_Source\Presentation" where did that come from?
...

That's just debug info that's in the no-source dll (or pdb?) files.  It's of no concern.

Be sure your IIS user has read and write permissions to these folders:
\Plugins\
\Plugins\bin\
Il y a 3 ans
Double checked that IIS AppPool user has full access to the folders yet it continues to cause problems. Twice in the past week this has brought the site down. Stopping and restarting the site in IIS resolves. PayPal transactions are going through. Surely, this couldn't work if permission was being denied. Why should one transaction progress satisfactorily whilst another causes the site to crash?
The windows application logs might offer more help. Note it states "'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.
Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied." As Stated the IIS AppPool user has full Control.

Application: w3wp.exe
CoreCLR Version: 4.700.20.11803
.NET Core Version: 3.1.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception: Plugin 'PayPal Standard'. Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.
Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.

---> System.Exception: Plugin 'PayPal Standard'. Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.
---> System.UnauthorizedAccessException: Access to the path 'C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll' is denied.
   at System.IO.FileSystem.DeleteFile(String fullPath)
   at System.IO.File.Delete(String path)
   at Nop.Core.Infrastructure.NopFileProvider.DeleteFile(String filePath) in C:\andrei\nopCommerce_4.30_Source\Libraries\Nop.Core\Infrastructure\NopFileProvider.cs:line 152
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.ShadowCopyFile(INopFileProvider fileProvider, String assemblyFile, String shadowCopyDirectory) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 105
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.PerformFileDeploy(ApplicationPartManager applicationPartManager, String assemblyFile, String shadowCopyDirectory, NopConfig config, INopFileProvider fileProvider) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 207
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 533
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 569
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 580
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfiguration configuration, IWebHostEnvironment webHostEnvironment) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 77
   at Nop.Web.Startup.ConfigureServices(IServiceCollection services) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web\Startup.cs:line 42
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Nop.Web.Program.Main(String[] args) in C:\andrei\nopCommerce_4.30_Source\Presentation\Nop.Web\Program.cs:line 11
Il y a 3 ans
Looking through the Application logs I note before the crash we see other errors such as:

Category: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
EventId: 1
RequestId: 800015c8-0000-e300-b63f-84710c7967bb
RequestPath: /shoppingcart/productdetails_attributechange
SpanId: |93fadca2-443de0501732a2a2.
TraceId: 93fadca2-443de0501732a2a2
ParentId:

An unhandled exception has occurred while executing the request.

Exception:
Microsoft.AspNetCore.Connections.ConnectionResetException: The client has disconnected
---> System.Runtime.InteropServices.COMException (0x80070040): The specified network name is no longer available. (0x80070040)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.IIS.Core.IO.AsyncIOOperation.GetResult(Int16 token)
   at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.ReadBody()
   at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
   at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
   at System.IO.Pipelines.Pipe.ReadAsync(CancellationToken token)
   at System.IO.Pipelines.Pipe.DefaultPipeReader.ReadAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.ReadAsync(Memory`1 memory, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.IIS.Core.HttpRequestStream.ReadAsyncInternal(Memory`1 buffer, CancellationToken cancellationToken)
   at System.IO.Pipelines.StreamPipeReader.ReadAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.WebUtilities.FormPipeReader.ReadFormAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Http.Features.FormFeature.InnerReadFormAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Mvc.ModelBinding.FormValueProviderFactory.AddValueProviderAsync(ValueProviderFactoryContext context)
   at Microsoft.AspNetCore.Mvc.ModelBinding.CompositeValueProvider.CreateAsync(ActionContext actionContext, IList`1 factories)
   at Microsoft.AspNetCore.Mvc.ModelBinding.CompositeValueProvider.TryCreateAsync(ActionContext actionContext, IList`1 factories)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at WebMarkupMin.AspNetCore3.WebMarkupMinMiddleware.ProcessAsync(HttpContext context, Boolean useMinification, Boolean useCompression)
   at WebMarkupMin.AspNetCore3.WebMarkupMinMiddleware.ProcessAsync(HttpContext context, Boolean useMinification, Boolean useCompression)
   at WebMarkupMin.AspNetCore3.WebMarkupMinMiddlewareBase.Invoke(HttpContext context)
   at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 125
   at Nop.Services.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) in C:\andrei\nopCommerce_4.30_Source\Libraries\Nop.Services\Authentication\AuthenticationMiddleware.cs:line 79
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Nop.Services.Installation.InstallUrlMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in C:\andrei\nopCommerce_4.30_Source\Libraries\Nop.Services\Installation\InstallUrlMiddleware.cs:line 53
   at Nop.Services.Common.KeepAliveMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in C:\andrei\nopCommerce_4.30_Source\Libraries\Nop.Services\Common\KeepAliveMiddleware.cs:line 50
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
Il y a 3 ans
It could be that the app pool is not releasing the DLL when recycling, see the last post here for specific things to try:
https://www.nopcommerce.com/en/boards/topic/82310/vps-restart-app-pool-on-site-error#266040
Il y a 3 ans
Thanks af1racing, that makes sense. I just wonder which plugin is to blame!
Il y a 3 ans
I suppose it could be related to " releasing the DLL", but considering that you're also getting the other network error, it would seem to me that you have some kind of (intermittent) security related issue.
Is your "IIS AppPool user" local, or a domain user?  (permission by group?)
Check the Application Event Log on the IIS server for any errors.
Il y a 3 ans
I have seen this as well "C:\andrei\nopCommerce_4.30_Source\Presentation" in my logs. I figured it was just some compiling leftovers in the source code. It doesn't seem to effect the running or be needed for the site to run.

You may try going to the "C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll" file on the server and right clicking it, view properties and seeing if it is being blocked.
Il y a 3 ans
New York wrote:
I suppose it could be related to " releasing the DLL", but considering that you're also getting the other network error, it would seem to me that you have some kind of (intermittent) security related issue.
Is your "IIS AppPool user" local, or a domain user?  (permission by group?)
Check the Application Event Log on the IIS server for any errors.


IIS AppPool in a local account
In the IIS logs just before the crash I can see a 400 response to the sendinblue/InportContacts which of course would be part of the transaction process because they use SendInBlue to disseminate the emails rather than the standard templates.
Il y a 3 ans
glhays wrote:
I have seen this as well "C:\andrei\nopCommerce_4.30_Source\Presentation" in my logs. I figured it was just some compiling leftovers in the source code. It doesn't seem to effect the running or be needed for the site to run.

You may try going to the "C:\inetpub\4.3Final\Plugins\bin\Nop.Plugin.Payments.PayPalStandard.dll" file on the server and right clicking it, view properties and seeing if it is being blocked.

I had previously checked and unblocked the "untrusted imported file". I have since verified that it is still in a trusted state.
It hasn't crashed again since Friday at 18:02 and meanwhile other transactions are being processed so it certainly is intermittent and so far shows no obvious pattern.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.