Base solution for your next web application

Activities of "marble68"

So I'm going through the Step-By-Step. The first time around, I did something wrong when trying to do Add-Migrations "Added_Phones" - That would never work. So I started trying to re-arrange my project so it looked like the samples to no avail.

I'm not an expert, so please forgive me if I'm asking dumb questions.

I am trying to do the Core-Angular2 version. The Angular4 project uses razor syntax, etc. and doesn't look anything like the step by step - so I'll stick with Ang2 version till I go through the step - by - step.

So I've started over - so I thought I'd ask a question (or two). I'm on VS 2017 - and I've downloaded the PhoneBook projects. I set my connection strings - but...

In the step by step is says to set the project to EntityFrameworkCore. There is no project by this name, so I presume it is Acme.PhoneBook.EntitryFramework? If that's correct, why don't any of the examples where Add-Migration or Update-Database, as shown in the step-by-step guide, work?

Opening the Package Manager Console - Update-Database gives me: The EntityFramework package is not installed on project 'Acme.PhoneBook.EntityFramework'.

So I go into the migrator and run the Acme.PhoneBook.Migrator.exe and everything works.

Should it already be installed? I found another thread where someone said "install this" <a class="postlink" href="https://www.microsoft.com/net/download/core#/current">https://www.microsoft.com/net/download/core#/current</a>

I've verified, in my Visual Studio 2017 setup, I have the .NET Core cross-platform development installed. So probably a dumb question, do I need to install the SDK as well?

Also - is it a bad idea to update all my nuget packages? I tried and it broke everything in the project, apparently.

Any advice is most appreciated. Thank you in advance, Chris

Hi -

I'm on AspNetZero Core + Angular (v 3)

I'm trying to get my app to work on IIS, but instead of it running at <a class="postlink" href="http://myapp.example.com">http://myapp.example.com</a>, I'm trying to run it at <a class="postlink" href="http://example.com/myapp/">http://example.com/myapp/</a>

Is this possible? I'm thinking not because I see a lot of URLs leading with / (such as /assets/appconfig.json).

If this isn't, then I'll use host headers. If it IS possible, how might I configure it to work this way? Thanks in advance

I have IIS setup, and my angular app is trying to connect.

In the core side, I'm setting my app settings as such:

"App": {
    "ServerRootAddress": "http://example.com/myappapi/",
    "ClientRootAddress": "http://example.com/myapp/",
    "CorsOrigins": "http://example.com/myappapi/,http://example.com/myapp/"
  },

on the angular UI appconfigure.json is:

{
  "remoteServiceBaseUrl": "http://example.com/myappapi/",
  "appBaseUrl": "http://example.com/myapp/"
}

If I use a standard jquery ajax call to the URL, will permissions and security be applied?

Or is there a abp / asp.net zero way this should be done?

If a user has permissions while editing one entity, I need to show a list of other other, active entities, if the user has permissions to them.

Thanks in advance for any guidance.

Kind regards,

I'm working on a system where each tenant can setup an entity that represents an individual; these entities are unique across all tenants.

On the public site - I have an action where the unique ID of the individual is passed as the ID.

A unique URL is created for individuals that

Do I need to create a custom service to do this?

I created a controller, TakeController.cs.

Suddenly, it just stopped working.

I added the following to Startup.cs:

app.Use((context, next) => { var endpoint = context.GetEndpoint(); Debug.WriteLine($"Endpoint: {endpoint.DisplayName}"); //if (SomeCondition) //{ // // Do some work //} return next(); }); On the other controllers, I see the name of the controller in the output console.

However, if I try and reach my controller, it's never even called.

I've cleaned and rebuilt the project, to no avail.

My enpoints are default:

` app.UseEndpoints(endpoints => { endpoints.MapHub

`

I created a new controller, called GoController.cs. It is picked up by the endpoint router, and calls Index() in the controller.

I tried removing my controller, and re-adding it, but it still doesn't get picked up... if I name it TakeController.cs

I've tried rebooting, as well.

I cleaned remove my obj and bin folders, everything builds and runs fine. I've compared project files for public

Might anyone have any suggestions why this happening, and how I can fix it?

Here's the source of my TakeController.cs:

` using Microsoft.AspNetCore.Mvc; using okto.work.Web.Controllers;

namespace okto.work.Web.Public.Controllers { public class TakeController : workControllerBase { //public IActionResult Index() //{ // return View(); //} // // GET: /HelloWorld/

    public ActionResult Index()
    {
        return View();
    }

    // 
    // GET: /HelloWorld/Welcome/ 

    public string Welcome()
    {
        return "This is the Welcome action method...";
    }
}

} `

Each tenant can create a unit entity called a taker.

Now, the Taker goes to the public website via a unique URL, then enters some info. Once done, I need to update that Taker entity from the public website.

Does disabling filters resolve calling CreateOrEdit? Do I need to impersonate?

Here's what I'm doing. I have this in my Controller for this request:


        [UnitOfWork]
        private void UpdateTaker(CreateOrEditTakerDto input)
        {
           using (var uow = UnitOfWorkManager.Begin())
            {
                using (CurrentUnitOfWork.SetTenantId(null))
                {
                    using (CurrentUnitOfWork.DisableFilter(AbpDataFilters.SoftDelete))
                    {
                        _takersAppService.CreateOrEdit(input).Wait();

                        uow.Complete();
                    }
                }
            }
        }

The error I'm getting is:

AbpAuthorizationException: Current user did not login to the application!

Obviously, the Taker does not log in. How do I do this the "right way". I'm leary of just making a function that can update an entity with no security.

Thanks for any advice.

I have a checkbox on an entity CreateOrEdit modal, and if it's changed, I need to make one of the inputs required (change the rules).

In the _CreateOrEditModal.js file's init event - I'm doing this:

            _$manualCleared = _modalManager.getModal().find('input[name=wasManuallyCleared]'); // $('#wasManuallyCleared]');
            _$manualCleared.change(function (e) {
                console.log('clear checked');
                console.log(e);
                // if this is set, Taker_wasManuallyClearedReason is required.
                $("#Taker_wasManuallyClearedReason").rules("add", {
                    required: true,
                    minlength: 2,
                    messages: {
                        required: "This field is required",
                        minlength: jQuery.validator.format("More than {0} characters are necessary")
                    }
                })
            });

Thanks for any advice.

Using v8.7 Jquery

I'm attempting to provide a way for my users to import an Entity (Taker) with excel.

I'm going through the User Import from excel as an example, along with the ABP documentation here: https://aspnetboilerplate.com/Pages/Documents/Background-Jobs-And-Workers

I created an ImportTakerDto - providing the exception and CanBeImported method, along with my properties.

I added a custommapper DTO.

I created a class for background job arguments.

I then created a background job, added a new TakersControllerBase. I then modified my TakerController to inherit from the base.

I added the import to excel buttons, and updated the index.js for Takers.

However, I get a 404 when calling it.

I've verified the auth token is there in the request header.

I've run npm run create-bundles on MVC, cleaned and rebuilt the project.

What should I check? Everything builds and runs - the only issue is when it tries to call my ImportFromExcel function on my TakerController it fails.

Thanks for any tips to check.

In my solution, when an tenant signs up - I'd like to define 4 roles with predefined permissions.

Level 1 Level 2 (Which has all permissions of level 1 + some) Level 3 (which has all permissiosn of level 2 + some) Level 4 (which is level 3 + some).

So, when a tenant signs up, these roles already exist and permissions already exist and cannot be modified. Then I'd remove the permission to modify roles at the host level.

This way, when users are added, they are, by default, in the Level 1 role.

I've accomplished this to this point.

However, In the event I want to allow a tenant to create new roles so they can name them what they want, how do I hide permissions from them (much like the Editions Features)?

Would I clone the GetUserPermissionsForEdit in UserAppService - and then, based on if the user is a tenant, filter out the permissions I don't want them to be able to see?

Is there a better way?

From a support standpoint, if I did this, if I logged in as host then impersonated the tenant admin, I could check if the host is impersonnating their admin and then show all permissions?

Thanks for suggestions.

So I'm trying to setup a CD on a staging server, and everything is working except my dotnet build doesn't generate bundles.

Obviously - these aren't in source control; but everything needed to do it is.

I've got npm, yarn, gulp, etc. on my staging server.

I'm using GoCD (in case that matters).

Has anyone ever done this, or with ANZ do we have to it manually every time?

Thanks for any advice.

Showing 1 to 10 of 68 entries