Last post Oct 18, 2018 02:24 PM by bruce (sqlwork.com)
Oct 17, 2018 05:48 AM|RioDD|LINK
Is it possible to do a controller in dll and if it is how do I install it? The idea is that this api calls should be installed only if the customer has subscribed to it. It is not acceptable to solve this with access rights.
Oct 17, 2018 08:52 AM|PatriceSc|LINK
ASP.NET often uses customizable mechanisms. Based on https://blogs.infosupport.com/asp-net-mvc-4-rc-getting-webapi-and-areas-to-play-nicely/ you might be
able to customize how the controller is selected among available DLLs. But it means each user would have its own endpoint (and you still need to secure each of them so that only a given customer can use it).
Make sure you really do get some benefit for this increased complexity...
Oct 17, 2018 12:17 PM|RioDD|LINK
This is not what I was planning to do. I need to use the dll and do the web api call on the dll maybe add some extra routes, but like in the link it completely doesn't have a purpose.
Oct 17, 2018 12:48 PM|PatriceSc|LINK
Not ? My understanding is that you basically want something such as finding controllers in the DLLs that ships as part of your web site or ignore them if the corresponding DLL is not deployed ?
Or you planned to use conditional compilation to have a DLL that includes the needed combination ?
Oct 17, 2018 02:23 PM|bruce (sqlwork.com)|LINK
Oct 18, 2018 08:07 AM|RioDD|LINK
I'm definitely going to try this Bruce. Do you have any examples? I don't see how to add the routing
Oct 18, 2018 02:24 PM|bruce (sqlwork.com)|LINK
to have the controller control routing use route attributes, to have the app control routing use route maps. all routing does is set the area, controller and action name mapping from the request url.