Activities of "ElifKaya"

Hi,

Can you share the full error logs?

Hi,

Actually, current user has permission and it didn't throw exception from other appService with this tenant. It throwed exception when we use tenant just EventHandler.cs. So I think that we need to add tenant information in ClaimsPrincipal, is it possible or can you advice any other option? Thanks

Hi, I created an article to show how to hide ABP related endpoints on Swagger UI by simply checking from the settings page. Your requirement is almost the same, so you can follow this article and update it according to your needs.

Also, please notice if you want to hide ABP-related endpoints on Swagger UI on development time, you can use the built-in option: https://docs.abp.io/en/abp/latest/API/Swagger-Integration#hide-abp-endpoints-on-swagger-ui

Thanks, I used this method to hide endpoints before. But, we want t o manage this option dynamically. For example, if admin user select some module from UI, then we want to show it on swagger. Otherwise, users should not see this module's endpoints Is it possible?

I recommend you instead do this in a normal API controller instead of an App service as you want to return a file rather than some wrapped ajax/json response - which is what the dynamic API part of ABP will do with the AppServices.

Here is an example returning and ICS file.

[HttpGet] 
[AllowAnonymous] 
public FileResult ICS(Guid id) 
{ 
    var appointment = _attendanceRepo.GetAllIncluding(c => c.CalendarEvent, d => d.CalendarEvent.OwnerCalendar.Owner).First(d => d.Id == id); 
 
    string output = $"BEGIN:VCALENDAR" + rt + 
        $"VERSION:2.0" + rt + 
        $"BEGIN:VEVENT" + rt + 
        $"UID: calendr-" + appointment.Id + rt + 
        $"DTSTART:" + string.Format("{0:yyyyMMddTHHmmssZ}", appointment.CalendarEvent.Start) + rt + 
        $"DTEND:" + string.Format("{0:yyyyMMddTHHmmssZ}", appointment.CalendarEvent.End) + rt + 
        $"SUMMARY:" + appointment.CalendarEvent.EventName + " with " + appointment.CalendarEvent.OwnerCalendar.Owner.FullName + rt + 
        $"LOCATION:" + appointment.CalendarEvent.Location + rt + 
        $"END:VEVENT" + rt + 
        $"END:VCALENDAR" + rt 
        ; 
 
 
    HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK); 
    var stream = new MemoryStream(Encoding.UTF8.GetBytes(output ?? "")); 
    result.Content = new StreamContent(stream); 
    return File(stream, "text/ics", fileDownloadName: appointment.CalendarEvent.EventName + ".ics"); 
 
} 

Hi, Thank you for your comment. But, we used ajax request successfully in Angular. So, I think that we should achieve this in MVC.

Newtonsoft

I used AbpSystemTextJsonSerializerOptions configuration in our module template solution, it works actually. And, I send also response data from swagger. (I used NetTopologySuite library also).

But, when I used this module in our other module solution as a package reference, it throws self referencing loop exception.


The problem is here, the other solution which uses our module template module. I also add AbpSystemTextJsonSerializerOptions configuration in its HttpApiHostModule and WebHostModule.


I need to use it for child entity. So, I just wondered if there is CurrentUser change function like for tenant. Thank you for your advice, we will need to this in the future. But, I will add CreatorId as a parameter right now. Thanks,

Can you please confirm whether you are implementing ISoftDelete for your parent entity also, in your case for Model entity ?

Thank

Hi,

Actually, I added ISoftDelete interface in only child entities. Do we have to use it in both parent and child tables? We used only hard deletion in a parent entity.

Now I added it to the parent entity as well and it worked.

Thanks

hi

I think the UPPY_UPLOAD_ENDPOINT should be your web host url.

But, Our file management module and endpoints are consumed from AuthServer. We want to use File Service as a different microservice actually. So we put it AuthServer for now, we will to move another microservice in the future.

How can I add a current token to microservice endpoint from js. file?

AuthServer/swagger

access_token

Hi,

I couldn't see access_token in my request. I used file management service from AuthServer. I think I can't send a access_token to file managment service from WEB host. Because, I could upload file from AuthServer/Swagger endpoint. But I couldn't do this operation from web MVC UI with using by same endpoint. How should I send access_token?

hi

Authenticationscheme : openIddict. validation.AspNetcore was not authenticated.

Does your request carry the access_token?

Should I add any other permission? I can upload a new file from AuthServer/Swagger endpoint. But I can not do this operation from web MVC UI with using by same endpoint.

Showing 1 to 10 of 53 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11