Permission problem with webservice

ACaignieACaignie Member Posts: 91
Hello,
I'm having an issue with the webservices of NAV 2017 (cu11): periodically the error 'You do not have the following permissions on TableData Dossier Setup' is logged.
This is the situation:
- User opens a page with an C# addin
- The addin uses the webservice to update data periodically with a background worker. In C# the credentials for the webservice are set to "UseDefaultCredentials"
- The webservice runs on a dedicated service tier, where credential type = Windows, use NTLM authentication = FALSE, Enable SSL = FALSE

When the service tier is started this works fine for a while, but suddenly the above error occurs in the event viewer for some users, not all. From then on the error is logged every time one the web service is called for these users, while other users still receive updates.

Does anyone know what can cause this? I'm 100% sure all users have read permissions on the table, as they can't start the page without.

Kind regards,
Andy


This is the complete error in the event viewer:

Server instance: SOAP_1
Tenant ID:
<ii>User:
Type: Microsoft.Dynamics.Nav.Types.NavPermissionException
Remappable: True
ErrorCode: 18023807
ErrorNumber: 1407
ModuleNumber: 19
SuppressMessage: False
SuppressExceptionCreatedEvent: False
FatalityScope: Call
Message: <ii>You do not have the following permissions on TableData Dossier Setup (Global): Read</ii>
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.PermissionSetBase.VerifyPermissions(NavApplicationObjectBase securableObject, PermissionMask permissionMask, LimitedUserPermissionChecker limitedUserPermissionChecker, Func`2 checkTableEmpty, PermissionMask additionalIndirectPermissions)
at Microsoft.Dynamics.Nav.Runtime.RecordImplementation.VerifyPermissions(PermissionMask permissionMask, Boolean checkForEmptyTable)
at Microsoft.Dynamics.Nav.Runtime.RecordImplementation.FindRecordWithoutCheckingValues(DataError errorLevel, NavValue[] primaryKeyValues, FiltersAndMarks filtersAndMarks, Boolean useRecord, Boolean cacheOnly, Boolean calcAutoCalcFields)
at Microsoft.Dynamics.Nav.Runtime.RecordImplementation.GetRecord(DataError errorLevel, NavValue[] values)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.ALGet(DataError errorLevel, NavValue[] values)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50075.GetActivityInfo_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50075.GetActivityInfo()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50075.AddInstructionsDossier_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50075.AddInstructionsDossier(INavRecordHandle precDossier, NavDate pdatStartDate, NavDate pdatReferenceDate, Int32 poptDossierStatus, Int32 poptInstructionStatus, Int32 poptShowInstructions, Boolean pbolHideEarlierDossiers, Int32 poptSorting, ByRef`1 pbolPlanningLinked, ByRef`1 ptSortKey, Boolean pbolDeleteCurrent, ByRef`1 piNextPlanItemID, INavRecordHandle precTmpPlanItems)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50075.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50069.GetUpdatedContainerPlanning_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.Runtime.NavMethodScope.Run()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50069.GetUpdatedContainerPlanning(NavCode pcodPlanningEnv, NavText ptCustomerFilter, NavCode pcodStatusFilter, NavCode pcodAddressID, NavCode pcodPlaceID, NavCode pcodZone, NavText ptTransportDate, NavText ptDateTimeLastUpdated, ByRef`1 pbtPlanningUpdate)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Dynamics.Nav.Runtime.TaskHelper.Rethrow(Exception exception)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean isSoapMessage, Uri url, XmlReader input, TextWriter output, NavUserAuthentication navUserAuth)
at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass3_1.<ProcessMessage>b__2()
at Microsoft.Dynamics.Nav.Service.WebServices.Disposer.Scope(Code code)
at Microsoft.Dynamics.Nav.Service.WebServices.WCFUtil.GetPopulatedMemoryStream(StreamFillingCallback callback)
at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.ProcessMessage(Message message)
at SyncInvokeProcessMessage(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2146233088
</ii>

Best Answer

Answers

  • ACaignieACaignie Member Posts: 91
    KTA8 wrote: »
    I've plenty of WebService automations and in my experience the most common problem is that the automation doesn't have an empty license in the moment which is called.

    Hi KTA8, can you give a little bit more information? Our license is stored in the database, so I don't assume its a license problem
  • ACaignieACaignie Member Posts: 91
    The answer of KTA8 gave me a clue, and I finally found the solution by logging information in the event viewer: the security for some users was set by company, and the web service uses a different company. Adjusting the roles fixed it.
Sign In or Register to comment.