Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

UserId null issue on Abp version 3.5.0 #5020


User avatar
0
Elevonais created

Hi Team,

We are working Abp framework 3.5.0. After upgrading we facing issue of AbpSession.GetUserId as null. Unfortunately it works perfectly fine on Swagger. If we move API url into exsisting proxies it works fine. If we move that in customize proxies it throws the above error.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Elevonais,

    If we move API url into exsisting proxies it works fine. If we move that in customize proxies it throws the above error.

    I couldn't understand this. Can you explain it by example code ?

  • User Avatar
    0
    Elevonais created

    Hi Ismcagdas,

    Assuming, if we are edition service proxy

    Example:

    getEditions(): Observable<ListResultDtoOfEditionListDto> { let url_ = this.baseUrl + "/api/services/app/Edition/GetEditions"; url_ = url_.replace(/[?&]$/, "");

        let options_ : any = {
            observe: "response",
            responseType: "blob",
            headers: new HttpHeaders({
                "Content-Type": "application/json", 
                "Accept": "application/json"
            })
        };
    

    if we change to Custom API url. we are able to hit the API

    Example:

    getEditions(): Observable<ListResultDtoOfEditionListDto> { let url_ = this.baseUrl + "/api/services/app/Test/TestApi"; url_ = url_.replace(/[?&]$/, "");

        let options_ : any = {
            observe: "response",
            responseType: "blob",
            headers: new HttpHeaders({
                "Content-Type": "application/json", 
                "Accept": "application/json"
            })
        };
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Elevonais,

    Can you tell which url throws the error ?

    • /api/services/app/Edition/GetEditions or
    • /api/services/app/Test/TestApi

    Can you also share the code of the service which throws error and the error mesage ? Your first post doesn't contain the error message.

    Thanks