ASP.Net Zero Version: v10.2 ASP.Net Core + Angular
After publising in Azure App Service, we are getting following error on Application startup
`Unhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\Program Files (x86)\SiteExtensions\ApplicationInsightsAgent\2.8.45\ExtensionManager\log4net.Production.config'.
File name: 'C:\Program Files (x86)\SiteExtensions\ApplicationInsightsAgent\2.8.45\ExtensionManager\log4net.Production.config'
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.File.OpenRead(String path)
at Abp.Castle.Logging.Log4Net.Log4NetLoggerFactory..ctor(String configFileName)
at lambda_method2(Closure , Object[] )
at Castle.Core.Internal.ReflectionUtil.Instantiate(ConstructorInfo ctor, Object[] ctorArgs)
at Castle.Core.Internal.ReflectionUtil.Instantiate[TBase](Type subtypeofTBase, Object[] ctorArgs)
at Castle.Core.Internal.ReflectionUtil.CreateInstance[TBase](Type subtypeofTBase, Object[] ctorArgs)
at Castle.Facilities.Logging.LoggingFacility.CreateProperLoggerFactory(LoggerImplementation loggerApi)
at Castle.Facilities.Logging.LoggingFacility.ReadConfigurationAndCreateLoggerFactory()
at Castle.Facilities.Logging.LoggingFacility.Init()
at Castle.MicroKernel.Facilities.AbstractFacility.Castle.MicroKernel.IFacility.Init(IKernel kernel, IConfiguration facilityConfig)
at Castle.MicroKernel.DefaultKernel.AddFacility(IFacility facility)
at Castle.MicroKernel.DefaultKernel.AddFacility[T](Action`1 onCreate)
at Castle.Windsor.WindsorContainer.AddFacility[T](Action`1 onCreate)
at GrowthPlan.Web.Startup.Startup.<ConfigureServices>b__4_7(AbpBootstrapperOptions options) in E:\Projects\GrowthPlan\GP-ANZ-v11.2.1\aspnet-core\src\GrowthPlan.Web.Host\Startup\Startup.cs:line 223
at Abp.AbpBootstrapper..ctor(Type startupModule, Action`1 optionsAction)
at Abp.AbpBootstrapper.Create[TStartupModule](Action`1 optionsAction)
at Abp.AspNetCore.AbpServiceCollectionExtensions.AddAbpBootstrapper[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Abp.AspNetCore.AbpServiceCollectionExtensions.AddAbp[TStartupModule](IServiceCollection services, Action`1 optionsAction, Boolean removeConventionalInterceptors)
at GrowthPlan.Web.Startup.Startup.ConfigureServices(IServiceCollection services) in E:\Projects\GrowthPlan\GP-ANZ-v11.2.1\aspnet-core\src\GrowthPlan.Web.Host\Startup\Startup.cs:line 220
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.<>c__DisplayClass15_0.<BuildStartupServicesFilterPipeline>g__RunPipeline|0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.<>c__DisplayClass14_0.<ConfigureServices>g__ConfigureServicesWithContainerConfiguration|0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.WebHost.Initialize()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at GrowthPlan.Web.Startup.Program.Main(String[] args) in E:\Projects\GrowthPlan\GP-ANZ-v11.2.1\aspnet-core\src\GrowthPlan.Web.Host\Startup\Program.cs:line 13`
Can you please let us know if log4net configuration in Startup.cs through ABP has changed or if we need to make any changes to the config file?
Here is the current log4net.Production.config
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="Console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5level %date [%-5.5thread] %-40.40logger - %message%newline" />
</layout>
</appender>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" >
<file value="App_Data/Logs/Logs.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10000KB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5level %date [%-5.5thread] %-40.40logger - %message%newline" />
</layout>
</appender>
<root>
<appender-ref ref="Console" />
<appender-ref ref="RollingFileAppender" />
<level value="WARN" />
</root>
</log4net>
ASP.Net Zero Version: v10.2 ASP.Net Core + Angular
Hello,
While trying to use 'Download collected data' feature, the DownloadBinaryFile API fails since the Tenant Id is not found. SImilary in some cases User Pictures are not visible since GetProfilePictureByUser API fails due to Tenant Id not found issue. For these APIs, there is no Authorization attribute or AbpAllowAnonymous attribute. Could this be the reason regarding Tenant Id not being found? If so, what kind of changes do we need to make it work?
Thanks in advance.
Hi,
We are using Angular + .Net Core template of the ASPNETZERO with version v11.2.1
Currently, for the logged in user, the right hand top corner shows following information -> Tenancy Name\User Name {First_Letterof_UserName}. The profile picture is showin in the first row of the User Settings area.
We would like to know if this is by design. Normally, the logged in user's profile picture is shown at the top and first letter is shown if the profile picture is not available. For example, the user profiles in the browsers like Chrome, Edge, or FireFox.
Thanks,
Hello,
We are using Angular + .net core template v11.2.1.
We want to hide the error message window shown on UserFriendlyException for a specific error returned from the backend. Please note that we still want to process the error in some other way but not showing the error message to the user.
Is there any way to achieve this functionality?
Thanks in advance.
Hi,
I am getting following error while running Migration project
Castle.MicroKernel.Handlers.HandlerException: 'Can't create component 'GrowthPlan.GrowthPlanCoreModule' as it has dependencies to be satisfied.
'GrowthPlan.GrowthPlanCoreModule' is waiting for the following dependencies:
- Service 'Microsoft.AspNetCore.Hosting.IWebHostEnvironment' which was not registered.
'
Also what connection string should I specify in app settings for Migrator project (source or destination database)?
Thanks in advance.
What is your product version?
What is your product type (Angular or MVC)?
What is product framework type (.net framework or .net core)?
What is ABP Framework version?
We are trying to update the project version to ASP.Net Zero 8.9. While following the steps from the following link - Version-Updating, we are able to complete the merge process but the files are not merged correctly.
It seems that the default git merge strategy (recursive) is not able to handle the merging in this case. Other git merge strategies also did not work properly in any case. We have tried following two approaches for merging
The merge process complete successully but the code in destination branch gets removed in both the cases mentioned above. Can you please let us know a version update process that can work seamlessly?
Thanks in advance.
What I'm trying to do
Issue that I'm facing
using (_unitOfWorkManager.Current.SetTenantId(defaultTenant.Id))
{
var defaultTenantRolePermissions = await _roleManager.GetGrantedPermissionsAsync(defaultTenantRole);
}
Pages.Tenant.Dashboard
Pages.Administration.Tenant.Settings
However, this method works fine for all other permissions. Is there anything missing or needs to be done differently?
Thanks in advance.
Hello,
While adding the dynamic parameters for some entities such as Abp.Organizations.OrganizationUnit, where can I add the dynamic parameters as there is no place to do it in the UI for Organization Units?
Are there any entities where dynamic parameters might not be applicable?
Thanks in advance.
Hello,
I have made the Clock.Provider as UTC in the application and can see the timezone setting for tenants/users. However when I set to a specific region, I am not able to see the values correctly in that locale (for ex, Login Attempts)? The values that are already in the database would be done with UnspecifiedClockProvider as per the documentation. So what would be the expected behavior here or are we missing any steps in the frontend?
Thanks in advance.
Hello,
I have configured SendGrid with ASP.Net zero in the following way
if (DebugHelper.IsDebug)
{
//Disabling email sending in debug mode
//Configuration.ReplaceService<IEmailSender, NullEmailSender>(DependencyLifeStyle.Transient);
}
Configuration.ReplaceService<IEmailSender, SendGridEmailSender>(DependencyLifeStyle.Transient);
The code gets executed without any errors but emails are not getting sent as exptected. If I execute the same code outside in another test project then the eamils are sent.
Is there any step that I need to do? I could not find any specific documentation for this.
Thanks in advance.