Closed atorres16 closed 5 months ago
You doesn’t seems to have valid startup in module, module startup inherits from StartupBase
Thank you, post edited, tested with same results
I still can't find it valid - verify your module startup inherited from Orchard's StartupBase and Configure method has three parameters e.g. https://github.com/OrchardCMS/OrchardCore/blob/ce045393f797fa478795a60aef8425a1d5ed3e85/src/OrchardCore.Modules/OrchardCore.Demo/Startup.cs#L42
I didn't know you had to inherit from startupbase, I didn't see that in the videos. I feel I need to configure something, but I have no idea what
We now support raw startups that don't inherit from StartupBase : IStartup
and that can have different signatures
But the Configure() parameter types we are looking for and then use if they exist, are IServiceProvider
, IApplicationBuilder
and IEndpointRouteBuilder
, so you can't use IWebHostEnvironment
, you need to resolve it from the passed IServiceProvider
instead.
I created these web projects
Module references Reusable API, and it works fine on it's own
Added Module into CMS and enabled it
The problem is, it can't find the controllers on Reusable API from the CMS
Details:
CMS Startup.cs
Module Startup.cs
Reusable API Startup.cs
ReusableAPI/Controllers/TestController.cs
If I run Module, I can call the API controller Test method with no problems
But, if I run the CMS, I can't call the API controller Test method, it gives me a 404 not found instead.
However - If I add controllers support on CMS/Startup.cs, the Reusable API works!
But now I can't access the admin page