Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- .NET Development
- :
- HttpListenerException "An operation was attempted ...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
HttpListen erExceptio n "An operation was attempted on a nonexisten t network connection "
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-13-2012 02:37 PM
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?

