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

Activities of "dreamsmiths"

Hi,

Yes I am aware of that, I was just placing the alert in there to see if that's the method being used. I will look into http interceptors.

Thanks in a million.

Hi,

Yes I am aware of that, I was just placing the alert in there to see if that's the method being used. I will look into http interceptors.

Thanks in a million.

Hi

I did edit the post, not sure if you saw it.

"For testing, I have added an alert in the showError method of "\node_modules\abp-ng2-module\src\abpHttp.ts" and alert was showing for all error messages. Should this method be overwritten instead of the one in the js file? .

showError(error: IErrorInfo): any {
      alert("am in");
        if (error.details) {
            return this._messageService.error(error.details, error.message || this.defaultError.message);
        } else {
            return this._messageService.error(error.message || this.defaultError.message);
        }
    }

"

I want to catch a specific UserFriendlyException and act on it.

Good day,

How can I override / overload the abp.ng.http.showError method in my angular project?

After reading couple of post, I have tried the following without success:

  1. added "../node_modules/abp-web-resources/Abp/Framework/scripts/libs/angularjs/abp.ng.js" to the .angular-cli.json file

  2. Created a js file with the following code:

var abp = abp || {};

(function () {

    abp.ng.http.showError = function (error) {
        alert("am in!!");
       
    }
})();
  1. Added js file to the .angular-cli.json file.

For testing, I have added an alert in the showError method of "\node_modules\abp-ng2-module\src\abpHttp.ts" and alert was showing for all error messages. Should this method be overwritten instead of the one in the js file? .

showError(error: IErrorInfo): any {
		alert("am in");
        if (error.details) {
            return this._messageService.error(error.details, error.message || this.defaultError.message);
        } else {
            return this._messageService.error(error.message || this.defaultError.message);
        }
    }

Hi,

Thanks in a million. Works like a bom!

Good day,

Is there a way in boilerplate to extend the AbpAuthorize attribute ?

I want to achieve the following:

When an authorized application service function is called , I want to execute some logic without adding a custom attribute to each authorized application service.

Thanks in advance.

Hi

We are looking to implement single sign in into our application. If the API and Angular App is hosted on different domains, would the Single Sign In still work out of the box?

[HttpPost]
        public async Task<AuthenticateResultModel> Authenticate([FromBody] AuthenticateModel model)
        {
          ....
            if (model.SingleSignIn.HasValue && model.SingleSignIn.Value && loginResult.Result == AbpLoginResultType.Success)
            {
                loginResult.User.SetSignInToken();
                returnUrl = AddSingleSignInParametersToReturnUrl(model.ReturnUrl, loginResult.User.SignInToken, loginResult.User.Id, loginResult.User.TenantId);
            }
...
}

Regards Dreamsmiths

Thanks in a million for your help.

Good day.

Thanks for your reply. That works for all app services endpoints. :D But I want the filter to execute on specific endpoint methods in my app services. Like below:

[TestFilter]
public async Task<RegisterOutput> Register(RegisterInput input)
{
}

How can I achieve this? Thanks in advance.

Good day.

Thanks for your feedback. :)

I have done the following:

Created the filter within the Web.Core project
Resisted the the filter in the Web.Host startup project.

I need to use the filter in the Application project and the Application project does not reference the Web.Host startup How can I achieve this?

Please advice ?

Thanks.

Showing 11 to 20 of 22 entries