Base solution for your next web application

Activities of "kumaran"

the problem is, the dto that has to match exactly as class design otherwise i am getting "AutoMapperMappingException" How can i avoid reference in dto object alone?

my model design is basically same as "convention 4" mentioned in this link http://www.entityframeworktutorial.net/code-first/configure-one-to-many-relationship-in-code-first.aspx

It is not self referencing DTO. The child table is referencing the parent table. Please look at my class model above.

ok i found the customdtomapper.cs and i changed the following line in my code to use maxdepth(1)

configuration.CreateMap<CreateOrEditOrderDto, Order.Order>().ForMember(x => x.CreatorUserId, opt => opt.Ignore()).MaxDepth(1);

I still have stackoverflow issue on the same line as i mentioned earlier. What am i missing?

i looked at the link above and i wanted to follow this option CreateMap<AppUser, AppUserDTO>().MaxDepth(3); how do i set the maxdepth in my abp objectmapper?

I have already installed the hosting bundle.

I fixed the error by hard coding the url in the statup.cs. I have double checked the settings.json and everything seems to be correct.

services.AddCors(options =>
            {
                options.AddPolicy(DefaultCorsPolicyName, builder =>
                {
                    //App:CorsOrigins in appsettings.json can contain more than one address with splitted by comma.
                    builder
                        .WithOrigins("http://[domain].com","http://localhost:4200"
                            // App:CorsOrigins in appsettings.json can contain more than one address separated by comma.
                            //_appConfiguration["App:CorsOrigins"]
                            //    .Split(",", StringSplitOptions.RemoveEmptyEntries)
                            //    .Select(o => o.RemovePostFix("/"))
                            //    .ToArray()
                        )
                        .AllowAnyHeader()
                        .AllowAnyMethod()
                        .AllowCredentials();
                });
            })

Can someone please help me. I am stuck here and not able to run my angular site after deploying. thanks

I did not change any code in startup.cs which has the corsorgin code

//Configure CORS for angular2 UI
            services.AddCors(options =>
            {
                options.AddPolicy(DefaultCorsPolicyName, builder =>
                {
                    //App:CorsOrigins in appsettings.json can contain more than one address with splitted by comma.
                    builder
                        .WithOrigins(
                            // App:CorsOrigins in appsettings.json can contain more than one address separated by comma.
                            _appConfiguration["App:CorsOrigins"]
                                .Split(",", StringSplitOptions.RemoveEmptyEntries)
                                .Select(o => o.RemovePostFix("/"))
                                .ToArray()
                        )
                        .AllowAnyHeader()
                        .AllowAnyMethod()
                        .AllowCredentials();
                });
            });

I did not change any code in startup.cs which has the corsorgin code //Configure CORS for angular2 UI services.AddCors(options => { options.AddPolicy(DefaultCorsPolicyName, builder => { //App:CorsOrigins in appsettings.json can contain more than one address with splitted by comma. builder .WithOrigins( // App:CorsOrigins in appsettings.json can contain more than one address separated by comma. _appConfiguration["App:CorsOrigins"] .Split(",", StringSplitOptions.RemoveEmptyEntries) .Select(o => o.RemovePostFix("/")) .ToArray() ) .AllowAnyHeader() .AllowAnyMethod() .AllowCredentials(); }); });

and here is my appsettings.json on server

"App": { "ServerRootAddress": "http://server-001-site1.itempurl.com", "ClientRootAddress": "http://client-001-site1.gtempurl.com", "CorsOrigins": "http://client-001-site1.gtempurl.com" },

Showing 11 to 20 of 35 entries