Repeated web service call always causes same error

Anatoliy_E
Member Posts: 5
Dear All,
I am working on integration with NAV via OData/SOAP. My .NET app using autogenerated clients. Everything is ok with system services (http://myNav.com:7047/MyNavServer/WS/SystemService or http://myNav.com:7048/MyNavServer/OData requesting "Company" entity), but when I am trying to call something company related (e.g. http://myNav.com:7048/MyNavServer/OData ... y('MyComp')) several times, only the first call is successful, second throws an exception
System.Data.Services.Client.DataServiceQueryException : An error occurred while processing this request.
----> System.Data.Services.Client.DataServiceClientException : <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">There is no Active Session within the filter.
Filters: Server Instance ID: 1029, Session ID: 434</m:message></m:error>
at System.Data.Services.Client.DataServiceRequest.Execute(DataServiceContext context, QueryComponents queryComponents)
at System.Data.Services.Client.DataServiceQuery`1.Execute()
at System.Data.Services.Client.DataServiceQuery`1.GetEnumerator()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray(IEnumerable`1 source)
at CRM.DevX.Tests.Integration.Nav.Odata.CompanyInformationClientTests.CompanyInformationService_SingleRequest(String companyName) in CompanyInformationClientTests.cs: line 16
at CRM.DevX.Tests.Integration.Nav.Odata.CompanyInformationClientTests.CompanyInformationService_MultipleSequentalRequests_UsingPersonalClients(String companyName) in CompanyInformationClientTests.cs: line 28
--DataServiceClientException
at System.Data.Services.Client.QueryResult.ExecuteQuery()
at System.Data.Services.Client.DataServiceRequest.Execute(DataServiceContext context, QueryComponents queryComponents)
Several requests made sequentially are possible only if there is a 15-20 sec delay between them. I've tried using same client instance for all the requests and separate for every request, same exception.
The same situation with SOAP services.
What I am doing in a wrong way. Please help.
I am working on integration with NAV via OData/SOAP. My .NET app using autogenerated clients. Everything is ok with system services (http://myNav.com:7047/MyNavServer/WS/SystemService or http://myNav.com:7048/MyNavServer/OData requesting "Company" entity), but when I am trying to call something company related (e.g. http://myNav.com:7048/MyNavServer/OData ... y('MyComp')) several times, only the first call is successful, second throws an exception
System.Data.Services.Client.DataServiceQueryException : An error occurred while processing this request.
----> System.Data.Services.Client.DataServiceClientException : <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">There is no Active Session within the filter.
Filters: Server Instance ID: 1029, Session ID: 434</m:message></m:error>
at System.Data.Services.Client.DataServiceRequest.Execute(DataServiceContext context, QueryComponents queryComponents)
at System.Data.Services.Client.DataServiceQuery`1.Execute()
at System.Data.Services.Client.DataServiceQuery`1.GetEnumerator()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray(IEnumerable`1 source)
at CRM.DevX.Tests.Integration.Nav.Odata.CompanyInformationClientTests.CompanyInformationService_SingleRequest(String companyName) in CompanyInformationClientTests.cs: line 16
at CRM.DevX.Tests.Integration.Nav.Odata.CompanyInformationClientTests.CompanyInformationService_MultipleSequentalRequests_UsingPersonalClients(String companyName) in CompanyInformationClientTests.cs: line 28
--DataServiceClientException
at System.Data.Services.Client.QueryResult.ExecuteQuery()
at System.Data.Services.Client.DataServiceRequest.Execute(DataServiceContext context, QueryComponents queryComponents)
Several requests made sequentially are possible only if there is a 15-20 sec delay between them. I've tried using same client instance for all the requests and separate for every request, same exception.
The same situation with SOAP services.
What I am doing in a wrong way. Please help.
0
Comments
-
solved
OnAfterGetRecord trigger of Company Information page runs following code when System Indicator is "Company + Database" :ActiveSession.SETRANGE("Session ID",SESSIONID); ActiveSession.FINDFIRST;
The code causes the error.
At Company Information page edit form I've changed System Indicator field value from "Company + Database" to "Company".0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions