cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1524
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Mayank Sharma on 02-03-2011 03:07:19 PM
Hi, 
 
I am trying to work with AXLApiService 8.0 and just trying to make a simple query to get user, which fails with the following exception:
 
"An established connection was aborted by the software in your host machine".
 
In the ReadMe file that came with SQL Toolkit and online, I found that I have to override the GetWebRequest method, but where should I do that.
 
Here's my sample code.
 

private static void MyGetUser()
{
       AXLAPIService service = new AXLAPIService("IP", "USERNAME", "PASSWORD");
       GetUserReq req = new GetUserReq();
       req.ItemElementName = ItemChoiceType88.userid;
       req.Item = "USERNAME";
       GetUserRes res = service.getUser(req);
       RUser user = res.@return.user;
       RUserUserGroup[] userGroups = user.associatedGroups;
}
 
This is method to be overidden:
 
protected override WebRequest GetWebRequest(Uri uri)
{
       HttpWebRequest webRequest = (HttpWebRequest) base.GetWebRequest(uri);
       webRequest.KeepAlive = false;
       webRequest.ProtocolVersion=HttpVersion.Version10;
       return webRequest;
}
 
By the way, I tried turning off my firewall and antivirus.

Subject: RE: An established connection was aborted by the software in your host mach
Replied by: Mayank Sharma on 04-03-2011 11:24:12 AM
Anyone?
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links