API: Problems with Search

When calling portal/shop/serviceitems?..&search=, from time to time an error occurs that we cannot reproduce/explain

You do not have permissions for this action. You must log in.
Sie haben keine Berechtigung für diese Aktion. Melden Sie sich an.

If I compare a successful and an unsuccessful call, one can notice the position where this happens.
On success, the WebLog shows Filter strategy for AccProduct --> Index (AccProduct), but in case of an error the following message is provided at the very same position (everything logged bevore is equal):

System.Exception: An error occurred while processing the request: GET https://.../portal/shop/serviceitems?UID_Person=2febbe7c-429e-4d37-b003-70c2b0f94e83&OrderBy=Ident_AccProduct asc&StartIndex=0&PageSize=20&UsePeerGroupFilter=false&UID_PersonPeerGroup=2febbe7c-429e-4d37-b003-70c2b0f94e83&IncludeChildCategories=true&search=test
---> VI.Base.ViException: Sie haben keine Berechtigung für diese Aktion. Melden Sie sich an.
at VI.DB.Implementation.Connection._CheckSession()
at VI.DB.Implementation.Connection.get_Session()
at QBM.CompositionApi.AspNetConfig.<.ctor>b__0_2()
at QBM.CompositionApi.AspNetConfig.CheckingConnection.<>c__DisplayClass0_0.<.ctor>b__0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at VI.Base.ResetLazy`1.get_Value()
at QBM.CompositionApi.AspNetConfig.CheckingConnection.<CheckConnectionAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.Handling.EntityCollectionRequest`1.<>c__DisplayClass72_0.<<BuildFilterStrategyAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.FilterStrategy.SearchFilterStrategyBuilder.<GetInternalAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.FilterStrategy.SearchFilterStrategyBuilder.<GetAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.Handling.EntityCollectionRequest`1.<BuildFilterStrategyAsync>d__72.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.Handling.EntityCollectionRequest`1.<GetDataSourceAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.Handling.EntityCollectionRequest`1.<GetEntityCollectionDataAsync>d__64.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.Definition.EntityMethodRouteBuilder.<>c__DisplayClass20_0.<<BuildResponseBuilder>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.ApiManager.JsonResponseBuilder.InnerJsonResponseBuilder.<WriteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.Compression.CompressionResponseBuilder.CompressedResponse.<WriteAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at QBM.CompositionApi.ApiManager.MethodRequestHandler.<SendAsync>d__12.MoveNext()
--- End of inner exception stack trace ---


Since all the other actions still work (I am obviously logged in) and the search is carried out via the AppServer, I understand this to mean that the login to the AppServer is no longer valid. However, I have not found any information in the log files on the AppServer.

Any ideas what else I can do?

Parents
  • Hi Wolfgang,

    Just a check question;

    Does this happen 'randomly' or does it always happen for the same groups / products consistently?

    If the later, it might be that you only have (partial) permissions on the table due to a viewing condition causing you to not be able to see everything.

    So, just to 'exclude' some things;

    -Does this happen at random or does it always happen for the same user / product combinations (with the user you're logged in with)?

  • Hi Jos,

    no, it's totally random.


    The AppServer is behind a Load Balancer and we saw, that both instances had a different certificate in the web.config (session token certificate). The documentation is not very specifiic at that point, but we saw another post here, that they should be equal. Hope that will solve the problem.

Reply Children
No Data