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

Activities of "abarref"

Hi @maliming, thanks for your reply.

I found a workaround that implies transforming the nswag proxy response:

service.config.nswag file:

  "extensionCode": "service.extensions.ts",
  "clientBaseClass": "ClientBase",
  "useTransformOptionsMethod": true,
  "useTransformResultMethod": true,
  

service.extenisons.ts file:

...... UPDATED: please view the other answer below

It's not a clean solution but achieves the desired behaviour.

--- Asp Net Zero version: 7.2.3 ---

I'm using the proxies generated by NSwag to call the backend like:

_entityProxyService.getSomeDto(id).subscribe(r =>{
    this.someDto = r; <------- here I'm expecting to possibly receive a null value
});

where getSomeDto(id) would be:

    public Task<SomeDto> GetSomeDto(int id)
    {
        return _dbContext.Entities.Where(m => m.Id ==id).Select(m => new SomeDto()
        {
            Id = mId
        }).FirstOrDefaultAsync();
    }

FirstOrDefaultAsync could return one result or null, but when it returns null I'm getting an empty javascript object on the other side, instead of simple null.

Is there a way to receive null backend responses as null javascript values?

Hi @timmackey, did you find a way to disable those messages?

@alper thanks for the suggestion. I took a look at the source code and found that it is also possible to set it in the appsettings.json as follows:

Regards

Thanks @alper. That works. Is there a way to achieve the same but when the database gets initialized? Because I'm recreating the db a lot at the moment.

Hi,

I would like to use Theme6 as the default theme when a Tenant gets created. What's the proper way of achieving that?

Thanks in advance

Hi @jguldemod,

Thanks for offering your help :)

The other day I followed the suggestion made in a comment in the following thread: AspNetCoreModuleV2 and hostingModel="InProcess" in IIS sub application failing to start

The most common issue people have been running into is the CurrentDirectory() being set to C:\Windows\System32\inetsrv rather than the app directory. Our current recommendation is to use https://github.com/aspnet/Docs/blob/master/aspnetcore/host-and-deploy/aspnet-core-module/samples_snapshot/2.x/CurrentDirectoryHelpers.cs to work around this until a future patch release.

Is the same recomendation made by "neuhausf" in that other thread that aaron provided.

Your fix is the same or is something else?

Has somebody tried using InProcess hosting model? It's supposed to be faster than OutOfProcess: ASPNET-Core-Hosting-on-IIS-with-ASPNET-Core-22

The problem is that when enabling in it the following happens:

Thanks for the clarification aaron.

Hi,

I'm using the asp.net core and angular 7 template, and I'm wondering if the authentication system uses refresh tokens. I just saw that in AppConsts.cs there is AccessTokenExpiration and also RefreshTokenExpiration. Does changing RefreshTokenExpiration has any effects?

Thanks

Showing 11 to 20 of 26 entries