Closed muhammedtas closed 9 months ago
I have a similar problem, in my pc is installed to Nop.Web/Plugins/bin folder but program stay in program.cs -> await host.StartAsync();
@mtugnoli it may be the same problem. Because what StartAsnyc() class does is to call ConfigureService methods and the others. For my case the breaking line is => (NopEngine.cs line : 152 - instance.ConfigureServices(services, configuration);)
If I am not wrong the missing dlls are => Microsoft.IdentityModel.Tokens and Microsoft.IdentityMode.Logging version 5.5.5.0
Some how application is not installing these dlls to Plugin/bin folder. Because PluginManager.cs class decides to not install these dlls to target folder, because of its behaviour that I am not aware of for now.
Then I've Downgrade Microsoft.AspNetCore.Authentication.JwtBearer nuget to version 2.1.30. Now application is running. Web api plugin is shown as "Installed"
I hope it helps
@muhammedtas in my case, after compiled the plugin all dll seem in the target folder, but after installed (from button on admin section), i restart the app and no one error, but debug remain in await host.StartAsync(); and all seem locked
@mtugnoli Did you try installing this plugin, by copying it to directly NopCommerce/Plugins folder?
What I did after fixing my problem is that, I copied api pluging to where the others are in. Then update its .csproj file. Then build it. Now its running quite stable.
@muhammedtas im trying to follow the documentation i can see the API is generated under Nop.Web plugins but its not available under admin local plugins. Can you help what might be the problem?
I installed the API plugin. May I ask where I can obtain API Token? Thanks
@jacobuslee use POST
request to /token
endpoint. See swagger UI or /Nop.Plugin.Api/Controllers/TokenController.cs
.
Good day, i managed to generate the files but they dont contain csproj file. Is my folder contents correct?
Actually im not seeing any installed pluggin in my admin local plugins
I installed "api-for-nopcommerce 4.40.4" in the past, and now I want to download it again and read the instruction. Is "api-for-nopcommerce 4.40.4" no longer available now?
Do I also need to add "Api Users" Role to User in "api-for-nopcommerce 4.40.4" because I cannot find "Api Users" Role option in the API Plugin.
The token can be obtain, so the traffic is fine. However, API calls are forbidden. Does anyone know what the issue is?
I found the solution. Thanks
I found the solution. Thanks
Hello.
I tried to install this plugin as you documented.
It seems like installable on admin panel. I activated it.
But then application started to crash on startup, by saying someting like "System.IO.FİleNotFoundException" for Microsoft.IdentityModel.Tokens Version 5.5.0.0, and also for Microsoft.IdentityModel.Logging dlls.
I've investigated the problem a little bit and I saw that, in build time, some of the dll's in your plugin was not installed to Nop.Web/Plugins/bin folder. Then when NopEngine.cs tries inject plugin's interfaces to application via reflection, it failes to resolve dependencies.
On top of that my current nopcommerce version has Microsoft.IdentityModels.Tokens version as 5.2.4.0 but this plugin has 5.5.0.0
Do you have any suggestion for my problem?