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

Activities of "JeffMH"

I have an email going out that will "approve" a request by a user. Because I know I will get that look like "what, why you doing this", let me quickly explain.

Think of this as a fancy bug tracker (it's more complicate than that)

  1. User requests that someone do something for them (Add me to this item please).
  2. This sends an email to the person in charge that says, Mr. Nacho requests that you give them access to Item 1234. Click the link to approve request.
  3. The user will be on their phone 9 times out of 10, I don't want them to login. The link has a special hashed code, I check the code, and see "who are you and what action are you performing".
  4. I validate that the URL is valid, and it hasn't been clicked before, and execute the request.

So, my problem is that AbpSession is null because the request that is running is anonymous. But I need to impersonate the user that is making the request. As the code gets into the repository layer, things start to check for current user for things like audit fields and whatnot and starts to fail. I also have some custom code that saves history of records and it needs a current user in order to run correctly.

Can I accomplish this? I copied code out of the Impersonate functions to sign in as a user, but when I execute _authenticationManager.SignOutAllAndSignIn(), AbpSession does not change. I assume the Claim does not populate in Identity until you call back into the server, which means AbpSession does not ever populate.

Help! (Using the asp.net / angular 1.x version FYI).

I think you guys jumped the gun on EF Core. This has been a nightmare moving our project to this. I think when you generate a project that targets the full framework, you should be given the option to use EF Core or just plain old EF. There are still things that just aren't ready in EF Core yet.

We are struggling coming up with the right place to add code to seed tenant data. There are two scenarios when this needs to occur:

  1. When we create a new tenant
  2. On Database Migration.

We attempted to use the AbpZeroDbMigrator and pass in a seedAction to the CreateOrMigrateTenant function. The method that excepts this parameter is not part of IAbpZeroDbMigrator so we we couldn't call that within the TenantManager. We also tried overriding this method from within the AbpZeroDbMigrator in the EfCore project, and that didn't work because of a UnitOfWork / transaction locking issue.

Anyway, am I missing something easy here? We have default tenant data that has to be put in when we create and do migrations but I am am just not seeing a built in way to do this. I see the one for Hosts, but not tenants. Any help would be appreciated.

Using the latest version downloaded a couple weeks ago.

Kudos finding an issue here. I am sure that was not a trivial thing to track down.

Is it documented anywhere what needs to be done in order to load balance a system based off aspnetzero?

Just things that I know I need to check on are:

  1. Cache items
  2. Background jobs
  3. Notifications

Just trying to see if it's documented somewhere all the things that need to be done within aspnetzero to run multiple instances of a web server serving one app. I don't want to forget anything and something end up not working right.

Thanks

<cite>drcgreece: </cite> One more issue.

I dunno if my analysis is correct, but how would I extend for instance another datepicker in this case kendo ui to make use of that also?

Thanks

Sorry, I can't help you with that one.

Did you add the kendo.directives to your module configuration?

/* 'app' MODULE DEFINITION */
var appModule = angular.module("app", [
    "ui.router",
    "ui.bootstrap",
    'ui.utils',
    "ui.jq",
    'ui.grid',
    'ui.grid.pagination',
    "oc.lazyLoad",
    "ngSanitize",
    "ngMessages",
    'angularFileUpload',
    'daterangepicker',
    'angularMoment',
    'frapontillo.bootstrap-switch',
    'abp',
    'kendo.directives'
]);

On Step 4, I delete all the files in the File Explorer, I just don't unzip and override. You may have untracked files, and they may have removed files from the solution also, so I do that. GIT will understand if you delete a file, then add it back into the directory, that it was an edit, not a delete and add.

Other than that, yes, looks about right to me.

Quick question. The ZipFile you checked into Framework-Master, is it the same version of AspNetZero you have been using on your current code?

If not, you will need to reset things. Because you need to base your current changes off the code that was branched in Framework-Master. So this first time, what you need to do is take the new solution from AspnetZero, and manually copy your changes into that new solution. This was, your changes are now based off the new code. This way, as you download new versions, the merges will happen right.

If you did have the original file, then you would want to make sure you used the code you originally based your solution on to be the start of Framework-Master.

Where is a whiteboard when you need one lol.

I actually Use Visual Studio to resolve my GIT conflicts. So it's almost the exact experience I had with TFS. I run the GIT commands to merge on the command line, then go to VS and open Team explorer, and Click Changes. It shows you the merge conflicts and let's you fix them there. At least it works with vsts online. I assume it may work the same with GitHub.

Remember, Framework-Master will only have downloaded files. So it will never have changes that you manually made. You want GIT to just track changes that the AspNetZero guys made. Make sense? Then, once you merge from Framework-Master branch to your branch, your merging their changes into your changes. It works out perfectly. There are some manual steps after merge, like upgrading Nuget on any projects you added to the solution, moving around migrations, etc. But mostly pretty painless.

Good luck, you won't regret moving to GIT. It took my a while to make the plunge, but wow am I glad I did!

Showing 21 to 30 of 66 entries