While pushing expenses to Dynamics NAV, you may get an error like below 


-------------------------------
Timestamp:9/26/2016 11:47:19 AM Category:Main NAV Exception Priority:1  EventId:100 Severity:Critical
  Title:Exception while processing NAV Upload
  Message:NAVGLUpload.cs System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
  at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
  at GorillExpense.IntegrationApp.NAVGLService.GLEntry_Service.Create(String CurrentJnlBatchName, GLEntry& GLEntry)
  at GorillExpense.IntegrationApp.Classes.NAVGLUploadWCostCtr.NAVProcessSingleBatch(ExpenseInfo expense, List`1 memoFlds, String CreditAccount, String Name, Boolean useMemoFlds, ConfigurationLabelInfo configLabel1, ConfigurationLabelInfo configLabel2, ConfigurationLabelInfo configLabel3, ConfigurationLabelInfo configLabel4)
  at GorillExpense.IntegrationApp.Classes.NAVGLUploadWCostCtr.NAVProcessSingleExpense(List`1 ListExpenseInfo, List`1 Listsettings, List`1 ListConfigLabelInfo)

-------------------------------



Solution

This is an NAV authorization issue not a Gorilla Expense issue. This typically means the user is unable to access NAV via the NAV web service using his/her windows network ID

To resolve this issue make sure the user who is trying to push data from Gorilla Expense Integration App to NAV has access to the NAV Web Service URLs. To find NAV web service URL, login to the Gorilla Expense web application as an admin and go to Masters-> Company-> Select/Copy the connection string corresponding to the NAV company the user was trying to push the expenses to. Provide the URL to the user and ask the user to open the URL in a web browser on the same machine where s/he was trying to send data from Gorilla Expense Integration App to NAV. If the user is not able to open the URL, it is an NAV Authorization issue which needs to be resolved in NAV by giving the Users windows ID access to NAV (under administrations->Users section in NAV). Unless the user can access the URL, the integration will not work - Contact your NAV administrator to troubleshoot this issue if you are unable to resolve it using the solution given here.

User should try the integration once s/he can open the NAV Web service URL in their web browser.