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

Activities of "OriAssurant"

Can you provide guidance on a code deployment pipeline for aspnet core + angular?

I noticed you can run the build-with-ng.ps1 and build-mvc.ps1.

How does this fit into the pipeline?

Here is an example from a non-ABP project:

<a class="postlink" href="https://offering.solutions/blog/articles/2018/03/08/create-build-pipeline-for-angular-and-aspnetcore-app-with-visual-studio-team-services/">https://offering.solutions/blog/article ... -services/</a>

Our project is based on M5AJ1. We created a HttpPost method under a class that inherits AppServiceBase in Application project (so it is hosted on Owin). We could see and use the HttpPost method in swagger now.

The current issue is that I'm not able to retrieve the HttpHeader as there is no HttpContext or Request object in AppServiceBase, which is not implementing ApiController or IHttpController. I'm not able to inherit ApiController as I'm already inheriting AppServiceBase.

Just wondering how could I get request header information for this HttpPost method?

Thank you,

We're using MVC5.* + AJ1.*. In StartUp, we are using CookieAuthentication. I set the expireTimeSpan to 1 minute for testing purpose.

app.UseCookieAuthentication(new CookieAuthenticationOptions
{
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new PathString("/Account/Login"),
    SlidingExpiration = true,
    ExpireTimeSpan = TimeSpan.FromMinutes(1)
});

The issue is that when a user's cookie gets expired, the application throws the error of AntiForgery.AbpAntiForgeryApiFilter - Empty or invalid anti forgery header token.., and the page was not re-direct to the login page as expected.

And after that, if the user log in again, he will get cookie with expiration time of 1969-12-31T23:59:59.000Z, which in effect makes the cookie never expire -- causing that user never get automatically logged out. [attachment=0:334icsui]InfiniteExpirationDate.jpg[/attachment:334icsui]

Is there a way to log user out when the ApplicaionCookie gets expired rather than throw an error? I tried to use abp.session.userId, but the value is always not null.

Thank you,

I am making a call to WebAPI layer of the project.

Recently we added the header AbpApiAuthorize to controllers on WebAPI layer in the process of implementing token based authentication between Application project and Web API project calls.

How can I get the bearer token to add to the header before I call WebAPI project.

I am currently calling Authenticate method. But, do I need to call it every time? Or do we already have this stored in Identity or Session. If yes, how can I access it?

<cite>ismcagdas: </cite> Hi,

This might help <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/818#issuecomment-175117869">https://github.com/aspnetboilerplate/as ... -175117869</a>. Have you tried it with a Tenant which uses host database ?

Yeah, it's working for users in host database but not tenant users.. Finally I resolved it with the combination of EventBus and Signalr (Register the Signalr client in layout.js so that the logout event could always be triggered for the target user no matter which page the target user is on). Thank you!

Question

We're using MVC5.* + AJ1.* Just wondering whether there is a built-in retry logic in abp EventBus? (Immediate Retry or Delayed Retry, etc... ) And is the abp EventBus maintaining an in-memory queue or list to keep track of events?

Thank you,

I am looking for a message box with continue and cancel buttons and where I can have a<ins>hyperlink</ins> in the text area .

We separate our host database and tenant databases. And tenant users only exists in their own tenant databases. Would that cause the UserManager not able to find any user so that identityvalidation all fail and log out all users?

Dear Support,

We're using MVC 5.* + AngularJS1.*. We are trying to implement logging off another user when that user's securitystamp gets changed. We set up the OnValidateIdentity event in CookieAuthenticationProvider (UserManager is resolved and registered in OwinContext):

app.CreatePerOwinContext(() => IocManager.Instance.Resolve<UserManager>());

app.UseCookieAuthentication(new CookieAuthenticationOptions
{
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new PathString("/Account/Login"),
    Provider = new CookieAuthenticationProvider
    {
        OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<UserManager, User, long>(
                            validateInterval: TimeSpan.FromMinutes(1),
                            regenerateIdentityCallback: (manager, user) => manager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie),
                            getUserIdCallback: (ci) => (Int64.Parse(ci.GetUserId())))
    },
    SlidingExpiration = true,
    ExpireTimeSpan = TimeSpan.FromMinutes(30)
});

*: THE GetUserId() is under namespace Microsoft.AspNet.Identity instead of Abp.Runtime.Security.

After doing this, we noticed that all users get signed off (in one minute as I set the validate interval to be 1 minute), no matter whether the user's securitystamp gets updated or not. But we only want to log out users whose securitystamp has been changed. Do I miss something or do anything wrong in setting up the cookie authentication provider?

Thank you,

Answer

Error logging to post to AI would be really useful.

<a class="postlink" href="https://docs.microsoft.com/en-us/azure/application-insights/app-insights-api-custom-events-metrics">https://docs.microsoft.com/en-us/azure/ ... ts-metrics</a>

Showing 81 to 90 of 152 entries