Base solution for your next web application

Activities of "csona"

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.&lt;&gt;c__DisplayClass15_0.&lt;BuildStartupServicesFilterPipeline&gt;g__RunPipeline|0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.&lt;&gt;c__DisplayClass8_0.&lt;Build&gt;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

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;log4net&gt;
  &lt;appender name=&quot;Console&quot; type=&quot;log4net.Appender.ConsoleAppender&quot;&gt;
    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
      &lt;conversionPattern value=&quot;%-5level %date [%-5.5thread] %-40.40logger - %message%newline&quot; /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  &lt;appender name=&quot;RollingFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot; &gt;
    &lt;file value=&quot;App_Data/Logs/Logs.txt&quot; /&gt;
    &lt;appendToFile value=&quot;true&quot; /&gt;
    &lt;rollingStyle value=&quot;Size&quot; /&gt;
    &lt;maxSizeRollBackups value=&quot;10&quot; /&gt;
    &lt;maximumFileSize value=&quot;10000KB&quot; /&gt;
    &lt;staticLogFileName value=&quot;true&quot; /&gt;
    &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
      &lt;conversionPattern value=&quot;%-5level %date [%-5.5thread] %-40.40logger - %message%newline&quot; /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  &lt;root&gt;
    &lt;appender-ref ref=&quot;Console&quot; /&gt;
    &lt;appender-ref ref=&quot;RollingFileAppender&quot; /&gt;
    &lt;level value=&quot;WARN&quot; /&gt;
  &lt;/root&gt;
&lt;/log4net&gt;

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?

    • 8.9
  • What is your product type (Angular or MVC)?

    • Angular
  • What is product framework type (.net framework or .net core)?

    • .Net Core
  • What is ABP Framework version?

    • 5.9

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

  • Using the latest project code in the base branch (master, dev), copying ASP.Net Zero 8.9 code in another (aspnetzero) branch, merging aspnetzero into dev
  • Using the ASP.Net Zero 8.9 code in base branch (master, dev), copying latest project code in another (migrate) branch, merging migrate into dev

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

  • Each edition has a default tenant associated with it. This tenant can have some predefined users, roles, organizational units etc.
  • When a new tenant is created using this edition, it will copy the relevant items from the default tenant

Issue that I'm facing

  • In TenantManager.CreateWithAdminUserAsync, retrieve the role permissions using following statements
using (_unitOfWorkManager.Current.SetTenantId(defaultTenant.Id))
{
    var defaultTenantRolePermissions = await _roleManager.GetGrantedPermissionsAsync(defaultTenantRole);
}
  • While retrieving the permissions, following permissions are not returned from GetGrantedPermissionsAsync method 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

  • Commented this section in {MyProject}CoreModule.cs
 if (DebugHelper.IsDebug)
 {
    //Disabling email sending in debug mode
    //Configuration.ReplaceService<IEmailSender, NullEmailSender>(DependencyLifeStyle.Transient);
 }
  • Implemented my own class derived from IEmailSender and configured in the following way
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.

Showing 1 to 10 of 10 entries