Base solution for your next web application

Activities of "luqc1985"

<cite>ryancyq: </cite> Do you mean angular file upload library?

Currently, AspNetZero is using <a class="postlink" href="https://github.com/valor-software/ng2-file-upload">https://github.com/valor-software/ng2-file-upload</a>

Sorry, I didn't express it clearly. I want to say that the ASP.NET Core server is about the uploaded code. Is there any recommended packaged plugin that not only satisfies the upload, but also supports watermarks, thumbnails, etc. Perfect point plugin. If open source is better.

Thanks

hi all, Is there a more mature file upload plugin? Can you recommend it? Thanks

Question

hi , After each modification of the JS file, I need to regenerate the solution to execute the bundle. Is there any way to quickly complete the packaging? For example, save or F6 build a solution instead of regenerating the solution, That's too slow. Regards.

<cite>maliming: </cite> add it to resolvers in the PreInitalize method of your web module

Configuration.MultiTenancy.Resolvers.Insert(0,new MyDomainTenantResolveContributor());
public override void PreInitialize()
        {
			Configuration.MultiTenancy.Resolvers.Insert(0, typeof(MyDomainTenantResolveContributor));
}

It's ready to go, thank you very much

<cite>alper: </cite> hi,

for your subdomain issues you can create your own DomainTenantResolveContributor

#5482@5506404d-9f34-4a1a-a88f-6c5d1da6fbbe

public class MyDomainTenantResolveContributor : ITenantResolveContributor, ITransientDependency
	{
		private readonly IHttpContextAccessor _httpContextAccessor;
		private readonly IWebMultiTenancyConfiguration _multiTenancyConfiguration;
		private readonly ITenantStore _tenantStore;

		public MyDomainTenantResolveContributor(
			IHttpContextAccessor httpContextAccessor,
			IWebMultiTenancyConfiguration multiTenancyConfiguration,
			ITenantStore tenantStore)
		{
			_httpContextAccessor = httpContextAccessor;
			_multiTenancyConfiguration = multiTenancyConfiguration;
			_tenantStore = tenantStore;
		}

		public int? ResolveTenantId()
		{
			if (_multiTenancyConfiguration.DomainFormat.IsNullOrEmpty())
			{
				return null;
			}

			var httpContext = _httpContextAccessor.HttpContext;
			if (httpContext == null)
			{
				return null;
			}

			var hostName = httpContext.Request.Host.Host.RemovePreFix("http://", "https://").RemovePostFix("/");
			var domainFormat = _multiTenancyConfiguration.DomainFormat.RemovePreFix("http://", "https://").Split(':')[0].RemovePostFix("/");
			var result = new FormattedStringValueExtracter().Extract(hostName, domainFormat, true, '/');

			if (!result.IsMatch || !result.Matches.Any())
			{
				return null;
			}

			var tenancyName = result.Matches[0].Value;
			
			if (string.Equals(tenancyName, "admin", StringComparison.OrdinalIgnoreCase))
			{
				return null;
			}

			var tenantInfo = _tenantStore.Find(tenancyName);
			if (tenantInfo == null)
			{
				throw new UserFriendlyException("404", "404Test");
			}

			return tenantInfo.Id;
		}
	}
public override void PreInitialize()
        {
			IocManager.Register<ITenantResolveContributor, MyDomainTenantResolveContributor>(DependencyLifeStyle.Transient);
}

Like this? But it doesn't seem to be enforced...

hi , I'm trying to use the subdomain as Tenant approach. I updated my appconfig to use the https://{TENANCY_NAME}.domain.com/.

When the tenant is already registered, it will locate the tenant login page. If it is not registered, it will locate the host login page. I want to go to the Host login page only when I enter admin.domain.com. Other unregistered tenants are located. 404 page. What should I do?

Thanks in advance!

<cite>ryancyq: </cite> Looks like you just want to read app.config in .Net Core application. If so, you can try the approach mentioned in <a class="postlink" href="https://stackoverflow.com/a/45042421/6856176">https://stackoverflow.com/a/45042421/6856176</a>

If you don't want Abp tables being migrated, just directly inherit your DbContext class instead of AbpZeroDbContext class.

I got it , Thanks for checking into this. Have a nice day :)

<cite>ryancyq: </cite>

<cite>luqc1985: </cite> I want to implement modular development based on .net core. Like the sample code, I am not sure how to define it based on the configuration of IDesignTimeDbContextFactory. I am now adding a Factory class, and then directly specify the link string, I think like the sample code, without this class, directly by the configuration file?

Thanks

I assumed that you are referring to configuration for assembly definition in the config file? I could't find the config file you mentioned In the link provided, do you mean app.config?

What I really want is that the Blog in the example implements modular development in the form of abp. core, and the Factory in the class library Abp. Samples. Blog. EntityFramework uses configuration files. I'm not sure how to configure it. I'm adding a class library to do this. But I still hope it can be done only through configuration.

In addition, when I migrate, I want to migrate only my new tables, not the underlying tables in AbpZeroDbContext.

Can you help me look at it? Is there any solution?

Thanks

<cite>luqc1985: </cite>

<cite>luqc1985: </cite> I want to implement modular development based on .net core. Like the sample code, I am not sure how to define it based on the configuration of IDesignTimeDbContextFactory. I am now adding a Factory class, and then directly specify the link string, I think like the sample code, without this class, directly by the configuration file?

Thanks

In addition, when I am modularizing, I will add the infrastructure in AbpZeroDbContext. Because this is a separate module, can I just add the table migration I need?

In the example, the migration file is only the newly added table when it is initialized, or is it all files when it is initialized, and then manually deleted?

<cite>luqc1985: </cite> I want to implement modular development based on .net core. Like the sample code, I am not sure how to define it based on the configuration of IDesignTimeDbContextFactory. I am now adding a Factory class, and then directly specify the link string, I think like the sample code, without this class, directly by the configuration file?

Thanks

In addition, when I am modularizing, I will add the infrastructure in AbpZeroDbContext. Because this is a separate module, can I just add the table migration I need?

Showing 11 to 20 of 22 entries