Hi, I was trying to create a new metronic theme for my project. Then i found the repo https://github.com/aspnetzero/metronic, which I use to generate the bundle.css files by using the MetronicThemeChanger.exe. But after the bundle.css have been generated, it seems that the css classes does not match(a lot of css classes start with kt are missing) and a lot of differences between the generated one and the one existed in the project(ex. default theme's bundle.css file). Any suggestion on this?
Thanks
Hi,
Recently we tried to optimize the angular project by using a chrome plugin called Light house report. One of the suggestion they provided is to preload key requests, which leads us to the following website route preloading in angular.
What the website suggests is that we can use preloading strategy that is provided by the base angular, and also quick link loading stratergy provided by a third party library as well.
import { RouterModule, PreloadAllModules } from '@angular/router';
// …
RouterModule.forRoot([
…
], {
preloadingStrategy: PreloadAllModules
})
// …
However, when we try to implement this to our root-routing.module.ts file, the project can not start properly and the browser stuck. Any suggestion on this? Thanks
Hi,
Currently we have a migration service in our project, which is a recurring job, and what it does is keep track of of some dbsets in dbcontext A and try to update some dbsets in another dbcontext B. Right now we want to write unit test for this migration service but kind of stuck. Here is our issues:
Any suggestion on how i need to change my unit test or even the original service?
Thanks
Hi, Our project is using Angular as the UI side framework. We are trying to optimize the solution when the very first load of the screen and wish to bundle all the css into a single one. We notice that there is a DynamicResourcesHelper.ts to load some of the css, including primeng.datatable etc. Is there a way to bundle those as one? Thanks.
Hi, I have a question regarding managing cache for host and tenant. Is it possible to clear tenant cache from host or cache for both manage separately?
Thanks, Gaurav Singh
Hi ,
We recently upgraded to asp.net version 7.2.0. We are deploying API and Angular UI as seperate App on IIS. Before the upgrade, the Tenancy name was correctly resolved for the same set up. but after , tenancy name is not resolving correctly and the request from
https://portal2clinic.mellowoodmedical.com/account/login is redirected to https://api.mellowoodmedical.com//MyUserConfiguration/GetAll?d=1577128379597 . We could see that the tenancy name is not resolved in the redirected URL.
We have https://{TENANCY_NAME}.api.mellowoodmedical.com/ in "remoteServiceBaseUrl" and "appurl" of appsettings . The URL we are expecting to be resolved is https://portal2clinic.api.mellowoodmedical.com//MyUserConfiguration/GetAll?d=1577128379597 . The API is working as expected if we browse the API url.
one more issue we have identified is that on hosting application on server, it is expected to read settings from appsettings.production when the path is not defined. But it is now reading values from appsettings.json. Was there any change in the default values for environment?
Please let me know any further information is required.
Hi,
I have a date field which will show correct value when in 'en' but if the language is changed to 'zh-Hans' or 'pl' and few more languages on the portal, it is showing 'invalid date' with the following error on browser console. I have also noticed for language 'danish' its showing 'Feb 19, 1984' instead of 'Feb 14, 1984' in english. This is an issue blocking us from going Live. Please let me know if you need any further details.
main.b0db31c71107ecc133f7.js:1 ERROR Error: InvalidPipeArgument: 'Unable to convert "Invalid Date" into a date' for pipe 'e'
at $e (main.b0db31c71107ecc133f7.js:1)
at e.transform (main.b0db31c71107ecc133f7.js:1)
at main.b0db31c71107ecc133f7.js:1
at main.b0db31c71107ecc133f7.js:1
at Cm (main.b0db31c71107ecc133f7.js:1)
at oz (main.b0db31c71107ecc133f7.js:1)
at Object.updateDirectives (6.6b9e29a544a39c1d7d2e.js:1)
at Object.updateDirectives (main.b0db31c71107ecc133f7.js:1)
at Tm (main.b0db31c71107ecc133f7.js:1)
at Im (main.b0db31c71107ecc133f7.js:1)
Hi ,
I have a development branch and release branch, On development, I have recently updated ASPzero version to 7.2.0 where as in release branch, i have 3.x.x version.
I am having a single repository here. while doing the following steps,
soft.AspNetCore.Hosting.Internal.WebHost - Application startup exception
Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not instantiate Microsoft.AspNetCore.Mvc.Internal.MvcEndpointDataSource ---> System.Exception: Could not instantiate Microsoft.AspNetCore.Mvc.Internal.MvcEndpointDataSource. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'PatientPortal.Web.Host, Version=7.2.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load the specified file.
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
--- End of inner exception stack trace ---
at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[T](Assembly element)
at Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemLoader.LoadItems(Assembly assembly)
at Microsoft.AspNetCore.Mvc.ApplicationParts.RazorCompiledItemFeatureProvider.PopulateFeature(IEnumerable1 parts, ViewsFeature feature) at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature) at Microsoft.AspNetCore.Mvc.RazorPages.Internal.CompiledPageRouteModelProvider.GetViewFeature(ApplicationPartManager applicationManager) at Microsoft.AspNetCore.Mvc.RazorPages.Internal.CompiledPageRouteModelProvider.GetViewDescriptors(ApplicationPartManager applicationManager)+MoveNext() at Microsoft.AspNetCore.Mvc.RazorPages.Internal.CompiledPageRouteModelProvider.CreateModels(PageRouteModelProviderContext context) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionDescriptorProvider.BuildModel() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionDescriptorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context) at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.UpdateCollection() at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.Initialize() at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.GetChangeToken() at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func
1 changeTokenProducer, Action changeTokenConsumer)
at Microsoft.AspNetCore.Mvc.Internal.MvcEndpointDataSource..ctor(IActionDescriptorCollectionProvider actions, MvcEndpointInvokerFactory invokerFactory, ParameterPolicyFactory parameterPolicyFactory)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Castle.Core.Internal.ReflectionUtil.Instantiate[TBase](Type subtypeofTBase, Object[] ctorArgs)
--- End of inner exception stack trace ---
at Castle.Core.Internal.ReflectionUtil.Instantiate[TBase](Type subtypeofTBase, Object[] ctorArgs)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
--- End of inner exception stack trace ---
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext)
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.ResolveAll(Type service, IDictionary arguments, IReleasePolicy policy)
at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.ResolveInstanceOrNull(Type serviceType, Boolean isOptional) in D:\Github\castle-windsor-ms-adapter\src\Castle.Windsor.MsDependencyInjection\ScopedWindsorServiceProvider.cs:line 86
at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional) in D:\Github\castle-windsor-ms-adapter\src\Castle.Windsor.MsDependencyInjection\ScopedWindsorServiceProvider.cs:line 55
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Builder.MvcApplicationBuilderExtensions.UseMvc(IApplicationBuilder app, Action`1 configureRoutes)
at PatientPortal.Web.Startup.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in C:\Projects\MellwoodMedical\IdeasPatientPortalv2.0WebAPI\src\PatientPortal.Web.Host\Startup\Startup.cs:line 190
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Hi,
When I select a language from languages on tenant website and set it as default language, I am expecting the language for that user on tenant website to be that language. Is it the correct usecase of set default language on tenant website?
If yes, Could you please explain why the following step is not working as expected?
Expected result:
Actual result 2) Translation to the default language does not occur
Any help here is appreciated.
Hi ,
I have the set up below for hangfire dashboard authorization on angular and core application. Both are hosted seperatly.
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
Authorization = new[] { new Url.HangfireAuthorizationFilter() }
});
app.UseHangfireServer();
The HangfireAuthorizationFilter make use of the [AbpAuthtoken] which is set after login to api directly.
public bool Authorize(DashboardContext context)
{
try
{
var cookies = context.GetHttpContext().Request.Cookies;
var token = cookies["Abp.AuthToken"];
_logger.Info($"hangfire authorization token {token}");
JwtSecurityTokenHandler jwtSecurityTokenHandler = new JwtSecurityTokenHandler();
TokenValidationParameters tokenValidationParameters = new TokenValidationParameters
{
ValidAudience = _configuration.Audience,
ValidIssuer = _configuration.Issuer,
IssuerSigningKey = _configuration.SecurityKey
};
SecurityToken principal;
var _ = jwtSecurityTokenHandler.ValidateToken(token, tokenValidationParameters, out principal);
//httpContext.User
// Allow all authenticated users to see the Dashboard (potentially dangerous).
return _.Identity.IsAuthenticated && _.IsInRole("Admin");
}
catch(Exception ex)
{
_logger.Error("Exception on hangfire authorization ", ex);
return false;
}
}
Still getting 401 exception on /hangfire. Any thoughts?