You need to sign in to do that
Don't have an account?
HttpListenerException "An operation was attempted on a nonexistent network connection"
Hello,
New to SF development.
My environment is VS2010 .NET4 C#.
Code based on the CTI_Toolkit.
I notice that whenever I click on Contact, or Account or Lead to select an entity to add to the call log, that I get an
HttpListenerException "An operation was attempted on a nonexistent network connection" being caught in
\BrowserConnector\ConnectionListener\Common.cs
public static void DoResponse(HttpListenerResponse response, string responseString, HttpStatusCode code, string statusDesc) { // send response back to the BrowserConnector iframe try { byte[] buffer = Encoding.UTF8.GetBytes(responseString); response.ContentLength64 = buffer.Length; response.KeepAlive = true; response.Headers.Add("Access-Control-Allow-Origin", "*"); response.Headers.Add("Last-Modified: " + DateTime.Now.ToUniversalTime() + " GMT"); response.Headers.Add("Cache-Control: no-store, no-cache, must-revalidate"); response.Headers.Add("Cache-Control: post-check=0, pre-check=0"); response.Headers.Add("Pragma: no-cache"); response.StatusCode = (int)code; response.StatusDescription = statusDesc; response.Headers.Add("Cti-Message-Sequence: " + MsgSeqNum.GetNext()); response.OutputStream.Write(buffer, 0, buffer.Length); response.OutputStream.Close(); } catch (HttpListenerException hle) { Logger.WriteLogEntry(Logger.LOGLEVEL_HIGH, "Utils:DoResponse:", hle); } catch (TargetInvocationException tie) { Logger.WriteLogEntry(Logger.LOGLEVEL_HIGH, "Utils:DoResponse:", tie); } catch (InvalidOperationException ioe) { Logger.WriteLogEntry(Logger.LOGLEVEL_HIGH, "Utils:DoResponse:", ioe); } }
As such, I cannot seem to be able to attach that data (Contact/Lead/Account) to the call log.
I notice that in the CTIUserInterface class that there are a couple of functions:
public virtual void CallAttachData(string CallObjectId, Dictionary<string, string> mapAttachedData) { }
public virtual void CallUnattachData(string CallObjectId, string Key) { }
But I could not find any example on what to do with them.
Can anyone help me out?