Fiddler Running on Windows Server 2008 - wcf

I have an ARM embedded processor that talks to a .net WCF SOA (SOAP) web service application. The ARM device is remotely located and web service is hosted in a WS2k8 cloud server. I am having some protocol issues with the ARM code and would like to run Fiddler on my WS2k8 machine to observer the SOAP exchange between the embedded device and the web service application. I installed Fiddler Web Debugger V4.4.8 on the server but it does not capture any http requests. I know the ARM device is talking to my web services as it responds to several good SOAP exchanges. Anyone know how to set up Fiddler to work in the configuration I have explained?
Best Regards,
Steve Mansfield

Fiddler is a proxy, it captures any requests sent to it. If your ARM device supports a proxy, then point its proxy settings at the Fiddler endpoint on the Windows Server, port 8888. Also tick Allow Remote Clients to Connect in the Tools > Fiddler Options > Connections tab, and restart Fiddler.
If the client doesn't support configuring a proxy, you need to Use Fiddler as a Reverse Proxy.

They way I fixed it was to set in the client application to use a proxy (http://127.0.0.1:8888) so now the calls are redirected to fiddler and fiddler call the services, so I can see the traffic. Hope it helps someone

Related

Debugging the windows network stack for WCF service

I'm about to go and visit a client where we've been having some odd connectivity issues talking to a WCF based service. The WCF service is being hosted by a windows service rather than IIS.
On the client side I'm happy to use fiddler and I'm also using WCF tracing at the server end to generate a service trace file. On the wire I can use WireShark to see what's going on, my worry is that there is a little black hole between the windows network stack and the web service at the server end.
Does anyone know of a network shim or something that can grab the data at the server end between windows and the WCF service? (or can I configure fiddler to do this?)

May i open a port on Cloud Foundry?

I want to establish a UDP Connection from a terminal device to My App On Cloud Foundry.
all output from applications on Cloud Foundry is delivered by proxy via a web server (nginx) and as far as I know only http and https are open.
Perhaps you should look at alternative ways of communicating with your console application, what kind of communication are you trying to achieve?
Using the CF_HOST:UDP_PORT from your terminal device should be OK. I suppose that an application (Java, Perl, etc) is deployed on your terminal device and on the CF server an application with a UDP channel is deployed.
This is an old post but i've had a similar problem when porting my app to pivotal's cloud foundry platform.
Turns out you can continue to use tcp or udp for any outgoing traffic without doing any special configuration (e.g. service binding, etc) but only http or https for incoming traffic. However, there is an interesting workaround proposed here

Https and streaming? IDuplexSessionChannel via http - client port open by default?

I have some small questions of which I think they're quite easy to answer for a WCF expert, but which I don't exactly know. I'm hoping they're not to obvious:
Does transport security (http with
ssl) work in conjunction with
streaming? If no, how can I transfer
large data in a secure way to the
client?
If I am not completely off the track
an IDuplexSessionChannel requires
the client to open a port too, so
that the service can contact the
client via a callback. Does this
also affect an IDuplexSessionChannel
which comunicates via http? Port 80
should be open by default, shouldn't
it?
Yes streaming works with HTTPS (basicHttpBinding).
Yes duplex session channel requires port opened on the client because duplex communication over HTTP really means one connection from the client to the server and one reverse connection from the server to the client. Port 80 doesn't have to be opened by default on the client - if it is, it is most probably already associated with some web server so it cannot be used for the communication. Duplex communication is also WCF specific (it is not interoperable) and it leads to other consequences. For example in Windows Vista \ Windows 7 \ Windows 2008 Server with UAC you must run the client with elevated privileges or allow listening on the port by using netsh command line utility.
I'm not sure how these two questions are related but wsDualHttpBinding (implementation of IDuplexSessionChannel) doesn't support streaming or transport security.

WCF client connection problem

I am consuming a web service in .NET application with WCF client.
The Endpoint's address of the service is over port 4338, and it is over HTTPS, secured with WS-Security standard.
So the address is something like :
https://[servername]:4338/[servicename]/
I was not able to communicate to the service with just running the application.
it gave me the following error :
Could not connect to [servername]:4338
TCP error code 10060: A connection
attempt failed because the connected
party did not properly respond after a
period of time, or established
connection failed because connected
host has failed to respond
[servername]:4338
But when I run Fiddler to investigate the http communication, the application start to work, and I will be able to communicate to the service.
As well, I want to add that I have a different service on the same web server that hosts the first service, and that second service's address is hosted on port 8080, and I am able to communicate with it with WCF client (without running Fiddler).
So, I googled and I found that it might be related to the proxy settings. Do you know what the problem is, and how can I solve it?
Thanks
Fiddler acts as an Internet proxy server. In general, any symptom of the form: "it works when I use Fiddler" means "it works when there's a (different) proxy server".
Check your proxy server settings. In particular, as empi suggested, try it in a browser. If it works there, it could be due to the fact that the browser has the proxy settings configured, and that you do not have them configured for WCF.
If you have proxy set in Internet Explorer, it may cause the problem. What happens when you open https://[servername]:4338/[servicename]/ in Internet Explorer?
Thanks empi for the reply.
I found the answer.
Actually in our company we have a proxy settings through "Automatic configuration script"
and depends on the web sites we are targeting internally, the script will point us to the proper proxy.
So, from the script I got the proper proxy address.
and in my .NET application I added this code
WebRequest.DefaultWebProxy = new WebProxy("http://xx.xx.xx.xx:8080");
and that fixed the problem
So WCF client was not detecting the setting of the automatic script.
and this is the reason it worked when I run Fiddler, because Fiddler listen to the http communication, and send it again through the settings.

How to host WCF services locally instead of http binding..?

How to host WCF services locally instead of http binding.. I mean the services should be hosted within the .NET environment and not by using http or netTCP.. Could you please help me with the configuration for the same?
What are you trying to achieve here that can't be performed by using http or tcp settings for the local machine for both ends of the WCF contract? WCF isn't just between machines, you can also set it to communicate between different processes on the same machine.
I think you are confusing between hosting a WCF service and a WCF binding. A WCF service can be hosted in many different applications such as standalone executables, windows services, a web server such as IIS, ...
Once you've found an appropriate host for the service you have to decide what binding to use. A binding is used to specify the transport, encoding, and protocol details required for clients and services to communicate with each other.
Note that choosing a host could further limit the choice of bindings available. For example if you decide to host your service in IIS you could only use HTTP/S as transport and NetTcp is not available (in IIS7 it is available through WAS).
How to confgiure NetNamedPipeBinding.
How to: Host a WCF Service in a Managed Windows Service.