Is there anything else we can do about the size of this file? It just seems to be a list of all our app services. The solution I have provided above allows it to be cached, however, it is still a very large file to be loading on initial load.
Thanks
We have resolved the issue by generating the file only once on application start. Saving it in the wwwroot and referencing that instead. This is allowing the file to be cached:
public void GenerateScripts()
{
var output = GetAll(new ApiProxyGenerationModel() { Minify = true, Type = "jquery" });
string fullFileLocation = Path.Combine(Directory.GetCurrentDirectory(), @"wwwroot\Common\Scripts", "AbpServiceProxies.min.js");
using (FileStream fs = new System.IO.FileStream(fullFileLocation, FileMode.Create))
{
StreamWriter writer = new StreamWriter(fs);
writer.Write(_javaScriptMinifier.Minify(output.Content));
writer.Close();
}
Thank you to **apchenjun **for his solution on this thread: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/5379
Hi ismcagdas, thanks for your reply.
It is 55mb when minified which is still crazy to be loading on every page load.
I can create a custom controller but how will this help with caching/load times?
Thanks Scott
We are using MicrosoftIdentity and Microsoft Graph to sign in our users: MVC Project - AuthConfigurer: Everything is working fine, users can sign in, use Graph and [AbpUserLogins] is being populated: But [AbpUserTokens] is not being populated with the access token:
I have tried to insert the token manually, but the constructor for UserToken is protected:
Can anyone tell me how we should be putting the token into AbpUserTokens? We can create our own similar table to do the same thing but seems unnecesary if there is already the functioanlity to push the access tokens in in ABP.
Thanks,
Morning @ismcagdas,
That's great, thank you very much for your reply.
All the best
Hi,
With the people behind Moment.js even advising against using it, are there any plans to remove from ASP Net Zero? Or could be remove ourselves without any significant loss in functionality around subscriptions, notifications etc? The payload of both moment with locales and data are causing our bundle size to be much larger than it should be.
Thanks
Thanks for your reply ismcagdas
We are wanting to implement Microsoft Graph and believe this requires authenitcation through AddMicrosoftIdentityWebApp instead of OpenId does it not? We can get AD working fine and can login users. It is the Graph element that we are struggling with.
Hi @ismcagdas
We don't have the OpenID section of our appsettings enabled or configured as we were under the impression this is configured through this:
As per the instructions in approach 2 here: https://community.abp.io/posts/how-to-use-the-azure-active-directory-authentication-for-mvc-razor-page-applications-4603b9cf?_ga=2.167438713.612361716.1679501585-1726878413.1679501585
Is this correct?
Thank you Scott