Community
Showing results for 
Search instead for 
Do you mean 
Reply

error on testing web api swagger getting contacts, als contacts are not showing in Act! companion

Highlighted
Copper Contributor
Posts: 167
Country: Netherlands

error on testing web api swagger getting contacts, als contacts are not showing in Act! companion

when i test the get contacts i get the message below, other api test work fine:

 

{
"message": "An error has occurred.",
"exceptionMessage": "An item with the same key has already been added.",
"exceptionType": "System.ArgumentException",
"stackTrace": " at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at act.web.api.Services.ContactsService.MapPhoneNumbersFromEntities(Contact domainContact, Contact contact, ActFramework framework) in c:\\gitroot\\act.web.api\\act.web.api\\Services\\ContactsService.cs:line 437
at act.web.api.Services.ContactsService.<MapContactsFromEntities>d__13.MoveNext()
in c:\\gitroot\\act.web.api\\act.web.api\\Services\\ContactsService.cs:line 426
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)
at System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpContent.<LoadIntoBufferAsyncCore>d__49.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.WebApi.Extensions.Compression.Server.BaseServerCompressionHandler.<HandleCompression>d__23.MoveNext() in C:\\Repository\\git\\Microsoft.AspNet.WebApi.MessageHandlers.Compression\\src\\Server\\BaseServerCompressionHandler.cs:line 257
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.WebApi.Extensions.Compression.Server.BaseServerCompressionHandler.<SendAsync>d__21.MoveNext() in C:\\Repository\\git\\Microsoft.AspNet.WebApi.MessageHandlers.Compression\\src\\Server\\BaseServerCompressionHandler.cs:line 220
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.HttpServer.<SendAsync>d__24.MoveNext()"
}

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Nickel Contributor
Posts: 307
Country: United States

Re: error on testing web api swagger getting contacts, als contacts are not showing in Act! companion

A quick note.

 

I have a client that was also experiencing this exact error with the Act! Web API.  The API update (1.0.427.0) released last Friday appears to fix the error for them.  You may want to check it out.

 

Donald Egen

Patricia Egen Consulting, LLC