This is a migrated thread and some comments may be shown as answers.

FiddlerCore - System.Net.Sockets.SocketException

1 Answer 605 Views
FiddlerCore
This is a migrated thread and some comments may be shown as answers.
Sija
Top achievements
Rank 1
Sija asked on 06 Jan 2015, 04:20 PM
When using fiddlercore as web proxy in a WPF application and accessing web pages through a web browser control,  there are multiple socket exceptions thrown. When fiddler is turned off, we do not see these exceptions.

Fiddler start code snippet:
 const FiddlerCoreStartupFlags Flags = FiddlerCoreStartupFlags.Default;

            if (!FiddlerApplication.IsStarted())
            {
                FiddlerApplication.Startup(PortNumber, Flags);
            }

Fiddler shutdown snippet:
if (!FiddlerApplication.IsStarted())
            {
                return;
            }


            FiddlerApplication.BeforeRequest -= this.OnBeforeRequest;
            FiddlerApplication.ResponseHeadersAvailable -= this.OnResponseHeadersAvailable;

            FiddlerApplication.Shutdown();
            Thread.Sleep(TimeoutMilliseconds);

Below was the exception analysis using Windbg on a dump created:

Exception object: 0388db20
Exception type:   System.Net.Sockets.SocketException
Message:          An existing connection was forcibly closed by the remote host
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    125EEA10 72C5D2F8 System_ni!System.Net.Sockets.Socket.Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)+0x6375e8
    125EEA30 0CEB335D UNKNOWN!Fiddler.BasePipe.Send(Byte[], Int32, Int32)+0x85
    125EEA50 0CEB51EA UNKNOWN!Fiddler.ServerChatter.LeakResponseBytes()+0xfa

StackTraceString: <none>
HResult: 80004005
*************
Exception object: 038ba308
Exception type:   System.Net.Sockets.SocketException
Message:          An existing connection was forcibly closed by the remote host
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    0A7FF090 72C5D2F8 System_ni!System.Net.Sockets.Socket.Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)+0x6375e8
    0A7FF0B0 0CEB335D UNKNOWN!Fiddler.BasePipe.Send(Byte[], Int32, Int32)+0x85
    0A7FF0D0 0CEB51EA UNKNOWN!Fiddler.ServerChatter.LeakResponseBytes()+0xfa

StackTraceString: <none>
HResult: 80004005
*************
Exception object: 0390bf54
Exception type:   System.Net.Sockets.SocketException
Message:          An existing connection was forcibly closed by the remote host
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    0674F2E4 72C5D2F8 System_ni!System.Net.Sockets.Socket.Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)+0x6375e8

StackTraceString: <none>
HResult: 80004005
*************
0:008>
Exception object: 03876124
Exception type:   System.Net.Sockets.SocketException
Message:          An existing connection was forcibly closed by the remote host
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    0660F350 72C5D2F8 System_ni!System.Net.Sockets.Socket.Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)+0x6375e8
    0660F370 0CEB335D UNKNOWN!Fiddler.BasePipe.Send(Byte[], Int32, Int32)+0x85
    0660F390 0CEB51EA UNKNOWN!Fiddler.ServerChatter.LeakResponseBytes()+0xfa

StackTraceString: <none>
HResult: 80004005
*************
Exception object: 0388db20
Exception type:   System.Net.Sockets.SocketException
Message:          An existing connection was forcibly closed by the remote host
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    125EEA10 72C5D2F8 System_ni!System.Net.Sockets.Socket.Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)+0x6375e8
    125EEA30 0CEB335D UNKNOWN!Fiddler.BasePipe.Send(Byte[], Int32, Int32)+0x85
    125EEA50 0CEB51EA UNKNOWN!Fiddler.ServerChatter.LeakResponseBytes()+0xfa

StackTraceString: <none>
HResult: 80004005
*************
Exception object: 038ba308
Exception type:   System.Net.Sockets.SocketException
Message:          An existing connection was forcibly closed by the remote host
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    0A7FF090 72C5D2F8 System_ni!System.Net.Sockets.Socket.Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)+0x6375e8
    0A7FF0B0 0CEB335D UNKNOWN!Fiddler.BasePipe.Send(Byte[], Int32, Int32)+0x85
    0A7FF0D0 0CEB51EA UNKNOWN!Fiddler.ServerChatter.LeakResponseBytes()+0xfa

StackTraceString: <none>
HResult: 80004005
*************
Exception object: 0390bf54
Exception type:   System.Net.Sockets.SocketException
Message:          An existing connection was forcibly closed by the remote host
InnerException:   <none>
StackTrace (generated):
    SP       IP       Function
    0674F2E4 72C5D2F8 System_ni!System.Net.Sockets.Socket.Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)+0x6375e8

StackTraceString: <none>
HResult: 80004005

1 Answer, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 08 Jan 2015, 07:49 PM
Hi,

I'm not sure exactly what you're reporting. It looks like maybe you've configured your application to break on first-chance exceptions? If so, then the behavior you're seeing isn't unexpected. Other than these caught exceptions, are you having any problems?

If so, can you explain what problems you're having? (If you're not capturing traffic successfully and the URLs in question are HTTPS, you need to update your code to trust the FiddlerCore root certificate).

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
FiddlerCore
Asked by
Sija
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Share this question
or