Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "OriAssurant"

//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()
                        )
                        .SetIsOriginAllowedToAllowWildcardSubdomains()
                        .AllowAnyHeader()
                        .AllowAnyMethod()
                        .AllowCredentials();
                });
            });
Question

Browser console shows that GET https://api.alservices.com/AbpUserConfiguration/GetAll?d=1567102056688 call fails with net::ERR_FAILED

network tab

Environment

ASP.NET Core Angular v7.1.0 .Net Core 2.2 Windows 10 Chrome Version 76.0.3809.100 (Official Build) (64-bit) Node v10.15.0 IIS 10.0.17134.1

Host appsettings.json

"App": {
    "ServerRootAddress": "https://api.alservices.com/",
    "ClientRootAddress": "http://{TENANCY_NAME}.alservices.com:81/",
    "CorsOrigins":http://alservices.com:81,http://localhost:49152,
                    http://*.alservices.com:81",
    "SwaggerEndPoint": "/swagger/v1/swagger.json",
    "AllowAnonymousSignalRConnection": "true"
  },

Observations

No errors are present in host log files, AbpUserConfiguration/GetAll executes successfully.

Question

  1. Why are we getting a "net::ERR_FAILED" error in Chrome?
  2. Why are pages not loading?

Why are these links to github dead?

Please explain the flow. We have a site thats already in Prod. We are introducing new Features daily and what them seeded into the db and drive functionality based on Feature value.

Hello,

We are using a Multitenancy form of ABP.

We have added new features to ABPFeatures.cs:

public const string JobFeature = "App.Jobs"; public const string OfferFeature = "App.Jobs.Offer";

And we added this block to ABPFeatureProvider.cs

var JobFeature = context.Create( AppFeatures.JobFeature, scope: FeatureScopes.Tenant, defaultValue: "false", displayName: L("JobFeature"), inputType: new CheckboxInputType() );

JobFeature.CreateChildFeature( AppFeatures.OfferFeature, scope: FeatureScopes.Tenant, defaultValue: "false", displayName: L("OfferFeature"), inputType: new CheckboxInputType() );

After running the App locally, I do not see the Features in AbpFeatures table.

Also, how do we associate a Feature with an Edition via C#?

Thanks.

Bubbling this up again.

I would appreciate a paid service to produce a guide on how to move from ASP.NET MVC AngularJS --> ASP.NET Core Angular 7.

Thank you.

I am trying to get Current Tenant Name Or AbpSession in Constructor without parameter injection.

Working Code: public class CommonAllService : AppServiceBase { public IIMEIInformation _iMEIInformation { protected get; set; } private readonly IConfigurationRoot _configAccessor; private string _tenancyName; private readonly IAbpSession _session; public CommonAllService(IConfigurationRoot configAccessor,IAbpSession session) { _configAccessor = configAccessor; _session = session; _iMEIInformation = TenantDepedencyResolver.Resolve(_tenancyName); } public async Task GetDeviceInfo(GetIMEIRequest getImeiRequest) { return await _iMEIInformation.GetIMEIInformation(getImeiRequest); } }

we are Looking to get TenancyName or AbpSession without injecting in constructor? public class CommonAllService : AppServiceBase { public CommonAllService(IConfigurationRoot configAccessor) { _configAccessor = configAccessor; //Coming as Null var session = AbpSession.TenantId(); //Throwing abpexception GetCurrentTenant() its null var abc = GetCurrentTenant().TenancyName; _iMEIInformation = TenantDepedencyResolver.Resolve(_tenancyName); } }

Hi Abp Heros,

We have two different abp zero applications (one M5J1, and the other C2A7) using the same backend databases and sharing same users.

We were trying to call app2's API method from app1, but app2 requires authentication as well. Is it possible to use the authentication token generated from app1 to authenticate the user to call app2's API method?

Thank you

Here are two ways I use for throwing UserFriendlyException in GetLoginResultAsync:

var loginResult = await GetLoginResultAsync(loginModel.UsernameOrEmailAddress, loginModel.Password, loginModel.TenancyName,LoginCount);

throw new UserFriendlyException(L("PasswordAttempts")); throw new UserFriendlyException(L("LoginFailed"), L("InvalidUserNameOrPassword"));

In logs.txt, I can see Abp.UI.UserFriendlyException: Login failed! at Project.Web.Controllers.AccountController.<GetLoginResultAsync>d__28.MoveNext() in C:\Projects\Project.Web\Controllers\AccountController.cs:line 248

In application insights, I saw: The model item passed into the dictionary is of type 'System.Web.Mvc.HandleErrorInfo', but this dictionary requires a model item of type 'Abp.Web.Mvc.Models.ErrorViewModel'.

Forgot to mention, we're using application insights filter:

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)] 
public class AiHandleErrorAttribute : HandleErrorAttribute
{
    public override void OnException(ExceptionContext filterContext)
    {
        if (filterContext != null && filterContext.HttpContext != null && filterContext.Exception != null)
        {
            //If customError is Off, then AI HTTPModule will report the exception
            if (filterContext.HttpContext.IsCustomErrorEnabled)
            {   
                var ai = new TelemetryClient();
                ai.TrackException(filterContext.Exception);
            }
        }
    }
}

Thank you

I am not able to use UserFriendlyException from Account controller it doesnt give me expected pop up message Please help

Showing 71 to 80 of 152 entries