thank you for looking at this first of all. Here is what we are trying to do.
- Have a Client solution, simple HTML Page with Javascript file making Jquery AJAX Calls
- Have a Agency solution .Net MVC (CORS Enabled) which returns Partial View of Jquery.ui Autocomplete Text Box wrapped inside Razor to search agencies for Specific Company (i.e. Zurich, Berkley etc. are company codes passed from Client Website)
- Have a Customer solution .Net MVC (CORS Enabled) which return Partial View of Jquery.ui Autocomplete Text Box wrapped inside Razor to search customers for Specific Company (i.e. Zurich, Berkley etc. are company codes passed from Client Website)
- Have a Legal Disclaimer Solution .net MVC (CORS Enabled) which return Partial View of Legal Disclaimer wrapped inside Razor for Specific Company (i.e. Zurich, Berkley etc. are company codes passed from Client Website)
- Have a Customer Orders solution .Net MVC (CORS Enabled) which returns Partial View (razor) of all orders by customer selected in autocomplete text box in Customer Solution
All solutions (2nd, 3rd, 4th and 5th) work on their own perfectly fine but when client app (1st solution) puts Ajax Calls, SOMETIMES (not all the time), Client App fails to do Autocomplete complaining (in F12 in Chrome) Jquery.Deferred Exception: $(...).autocomplete is not a function.....
Now, all 2nd, 3rd, 4th and 5th Solutions have EXACT SET OF LIBRARIES (Jquery-3.4.2.js, Bootstrap.js, Modernizr.js & Jquery.UI.js) and they are all loaded in AJAX Call from Client APP which loads Partial Views with these libraries.
What works 100% of the time is, if we DON'T LOAD any of the 4 libraries with partial views and let Client App loads them. But this is not optimized solution because we don't control client application in production and their libraries and can't ask them to load our Micro solutions libraries which can vary from solution to solution in practical scenario.
How to solve this? Ideally we will want our Microsolution with its libraries loaded in each of the partial views it serves to client and don't get interfered with other Microsolutions loaded before current one or even with Client App if they have same libraries (of same version or not) Or in other words this Micro solutions should work completely independently with its own libraries.
Your help will be much much appreciated.
Regards.