Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Getting Error - Authenication failed because the remote party has closed transport stream

$
0
0

Hi Guys, 

I have one MVC application which is integarted with CRM. So whenever i click a link it downloads country list from CRM at that it throws error. 

I am pasting the code where I am getting error.

public static CRMhelperClass{
private static xxxContext _context = new xxxContext("Xrm");   -- xxxContext is a class

private static List<CountryDto> GetCountryList(){

List<CountryDto> countries = null;
var query = from z in _context.xxxx_countrySet    -- _context is object 
where z.statecode == 0
orderby z.xxx_name ascending
select new CountryDto()
{
Id = z.xxx_countryId.Value,
Name = z.xxx_name,
Region = (Enums.CustomerServiceRegion)z.xxx_region.Value
};

countries = query.ToList<CountryDto>();   --- I am getting error here
return countries;

}

//Its a system generated code

[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "7.1.0001.6557")]
public partial class xxxContext : Microsoft.Xrm.Client.CrmOrganizationServiceContext     // its object is being used in above 
{

public Microsoft.Xrm.Client.CrmEntityReference xxx_country
{
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("xxx_country");
}
set
{
this.SetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("xxx_country", "xxx_country", value);
}
}

}

I am not getting where is the error. On debug  only I get error  at  "countries = query.ToList<CountryDto>()" that i have indicated.

Debuging is  not allowed in system generated code.

Pls help I ambadly stucked here.

Thanks in advance.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>