Base solution for your next web application

Activities of "Hammer"

I’m not entirely sure, but I think you should configure the app so that the Swagger page will not be generated at all in a production environment.

Hello, I'm using Angular + Asp.net core, v13.

I'm a bit puzzled about how to use Metronic's stepper wizard. I understood that there is KTWizard that I can use, but as far as I know, no angular component is provided, at least I can't find a suitable import for my Typescript component.

From https://preview.keenthemes.com/metronic-v6/?page=docs&section=wizard, I understand that I have to reference the js library to be able to use it (that's understandable)... But then, where ? KTWizard object is not recognized in my typescript component, because I did not import anything...

Could you please help ?

My problem was due to the fact that no log is recorded anywhere on my computer, apparently. After checking a bit everywhere online, I found that I could still check the output directly in VS, in the output window by selecting the Web.Host output.

Obvious, but if you don't know... Problem was about a validator that was incorrectly set.

[Range(OrganizationUnitExtendedConsts.MaxDDDefaultDay, OrganizationUnitExtendedConsts.MinDDDefaultDay)]
        public int DirectDebitPreferedDay { get; set; }

Should be

[Range(OrganizationUnitExtendedConsts.MinDDDefaultDay, OrganizationUnitExtendedConsts.MaxDDDefaultDay)]
        public int DirectDebitPreferedDay { get; set; }

One thing remains to be seen: why don't I have any record of the logs in my IIS Express directory ?...

Hello, I'm using version 11.3, Angular .Net Core.

I tried extending the OrganizationUnit class by following documentation, but came to a bizarre behaviour in OrganizationUnitAppService's UpdateOrganizationUnit method.

Here is my new class:

public class OrganizationUnitExtended: OrganizationUnit
{    
    [Range(OrganizationUnitExtendedConsts.MinDDDefaultDay, OrganizationUnitExtendedConsts.MinDDDefaultDay)]
    public int DirectDebitPreferedDay { get; set; }
}

I ran the Migrations and thus added the column in DB.

Then, I created a DBSet for my new class in DBContext class:

public virtual DbSet<OrganizationUnitExtended> OrganizationUnitsExtended { get; set; }

In OrganizationUnitAppService, I replaced

private readonly IRepository<OrganizationUnit, long> _organizationUnitRepository;

with 

private readonly IRepository<OrganizationUnitExtended, long> _organizationUnitRepository;

I also changed OrganizationUnitDto to include my new property, and created a new UpdateOrganizationUnitExtendedInput.

public class UpdateOrganizationUnitExtendedInput
    {
        [Range(1, long.MaxValue)]
        public long Id { get; set; }

        [Required]
        [StringLength(OrganizationUnit.MaxDisplayNameLength)]
        public string DisplayName { get; set; }

        [Range(OrganizationUnitExtendedConsts.MaxDDDefaultDay, OrganizationUnitExtendedConsts.MinDDDefaultDay)]
        public int DirectDebitPreferedDay { get; set; }

    }

I then changed UpdateOrganizationUnit method to this:

 [AbpAuthorize(AppPermissions.Pages_Administration_OrganizationUnits_ManageOrganizationTree)]
        public async Task<OrganizationUnitDto> UpdateOrganizationUnit(UpdateOrganizationUnitExtendedInput input)
        {
            var organizationUnit = await _organizationUnitRepository.GetAsync(input.Id);

            organizationUnit.DisplayName = input.DisplayName;

            await _organizationUnitRepository.UpdateAsync(organizationUnit);

            return ObjectMapper.Map<OrganizationUnitDto>(organizationUnit);
        }

I have no trouble retrieving OrganizationUnit from this appService, but whenever I call UpdateOrganizationUnit, I get a 500 response, without ever reaching the method (Breakpoints inside the methos are not reached).

Is there something obvious I'm missing?

Hello devworkers,

would you agree to share the yaml you are using to build and publish the angular part of your application ? I am currently working on it and find mysylf stuck on this matter.

+1

Is there any news for this? I would be very interested in it. I tried to setup a pipeline, managed to make the backend part work, but am currently stuck with the angular part.

Here is what I have so far in my yml:

`trigger: - release

jobs:

- job: Frontend displayName: Frontend Processing continueOnError: false

pool:   vmImage: 'ubuntu-latest'   steps:   - task: NodeTool@0   inputs:   versionSpec: '12.x'   displayName: 'Install Node.js 12.x'   - task: Npm@1   displayName: 'Angular CLI'   inputs:   command: custom   verbose: false   customCommand: 'install @angular/[email protected]'   - task: Npm@1   displayName: 'npm install'   inputs:   verbose: false   - task: Npm@1   displayName: Build   inputs:   command: custom   verbose: false   customCommand: 'start'   - task: CopyPublishBuildArtifacts@1   displayName: 'Copy Publish Artifact: test'   inputs:   CopyRoot: dist   Contents: '**'   ArtifactName: test   ArtifactType: Container   - task: DownloadPipelineArtifact@2   displayName: 'Download Pipeline Artifact'   inputs:   targetPath: ' $(Build.ArtifactStagingDirectory)/dist/AngularTest'

- job: Backend displayName: Backend Processing dependsOn: Frontend continueOnError: false`

In the end, I opted for an Azure CDN hosted angular app with a custom domain, and it works like a charm.

Hi there, did you find a solution to your problem? I think I have the same.

Product in V10.0 aspnet.core / Angular

When deploying the Angular part of the application under a virtual directory, I get a blank page. Exploring the page, I see that the html part has loaded, but all the scripts and css could not be found. The message I get in chrome developer tool: "Refused to apply style from 'https://www.xxxxx.com/Error?statusCode=404' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

My dist files are located under https://www.xxxx/my-virtual-directory, but chrome's developer tools tells me it wants to load them from https://www.xxxx.com.

My appconfig.json looks like: "remoteServiceBaseUrl": "https://www.xxxx.com/my-virtual-directory-server/", "appBaseUrl": "https://www.xxxx.com/my-virtual-directory/",

It seems this could be related to this issue: https://support.aspnetzero.com/QA/Questions/4352/AppPath-issues-with-Core-under-IIS-Virtual-Directory

How to solve it remains unclear.

Could you please help me?

Showing 1 to 10 of 10 entries