Fiddler Not Capturing WCF traffic but capturing ASMX fine - wcf

I have been capturing traffic using Fiddler for some ASMX services that call other ASMX services. In this case, I have a simple WCF service calling those ASMX services. It won't capture any traffic. The only wrinkle is that it is using IIS not IISExpress (http://localhost/Interface12Service/Interface12Service.svc). How can I capture WCF traffic?

The Microsoft .NET Framework is hardcoded to bypass proxies for any request to http://localhost. To capture such requests in Fiddler or any other proxy, use
http://machinename:port/
or
http://localhost.fiddler:port/
as the target URL.

By default, Fiddler will not capture the traffic. If you want it to capture the traffic, change the client proxy base address to your machine name or to your IP (for instance: 127.0.0.1). This should do the trick. If not, try this.

It could just be that fiddler has difficulty picking up traffic from localhost
Try changing the address to http://localhost./Interface12Service/Interface12Service.svc
(Notice the dot after localhost.) This is a common hack for working with Fiddler.

Another possible issue is related to WCF client (this may also include other clients but i'm not sure).
The client can be configured not to use the machine default proxy, which makes the client/application bypass Fiddler capture.
For further reading: What is the purpose of usedefaultwebproxy in WCF.

Related

wcf hosted in a windows service and httpbindings

I'm working on a wcf hosted inside a windows service. It works like a charm but now I need to reserve a specific hostname for this wcf just as IIS does.
To be more clear, my hosted wcf runs on a windows server machine which response to multiple dns name, but I need to let the wcf reachable only from one of these dns. If I was using IIS it would be achievable by setting a specific hostname within the http-bindings settings, but unfortunately, I can't manage my wcf like that.
To your knowledge, is there any way to reserve a specific hostname for a hosted wcf outside IIS?
Thanks in advance!
yes, you could do it by register the http endpoint at kernel level(http.sys) using the following commands
cmd: ***netsh http add urlacl url=http://fqdn:port/urlpath user=serviceaccount***
Then only on that specific dns/hostname, your http service will listen.

Converting http service to https in Biztalk Dynamic Solicit Request Response port

I come across a very strange position, I was working on a project in BizTalk, initially I had to consume WCF services deployed on http. Now after a lot of work done. They just updated their bindings to https. Now what is option for me. how I change my orchestration. When I try toupdate service send port (http to https). I receive following error message on Biztalk.
Please guide me how to cater with this issue.
Regards,
You need to change the Security mode property in the Security tab to be Transport (or TransportWithMessageCredential) if you want to use https.
I believe you'll need to use another port type, like WCF-Custom.

Why does my self-hosted WCF service take IIS offline?

As you may know, IIS 6+ can share port 80 with other HTTP applications running in different processes.
However my self-hosted WCF service seems to take IIS offline. When the WCF service is running, all HTTP requests go to the service. When I stop the service, all HTTP requests go to IIS. This is despite the fact that the two applications are using very unique URI paths. What's the deal? How do I get them to play together nicely?
EDIT:
My WCF service uses a custom binding with an HttpTransportBindingElement
Sorry if this belongs on serverfault. I'm not sure if it's a configuration issue or code issue.
After a lot more experimentation, I've come to a conclusion.
It looks like the problem is caused when the endpoint base address of the WCF service is the same as the base address of IIS. In other words if an endpoint exists at http://localhost/, it will take over and handle all incoming HTTP requests.
So even if your WCF subpaths are different from IIS, the base endpoint address has to be something other than http://localhost/.

how to configure fiddler to monitor wcf calls to a wcf services hosted in IISExpress

situation:
my website (which contains the WCF service) is hosted in IISExpres port number 58366 (http://localhost:58366/myapp)
I have a winforms client which connects to the wcf service using BasicHttpBinding
I want to debug my wcf calls using fiddler, but can't seem find how to redirect wcf calls through fiddler.
IISExpress idiotically binds to the hostname "localhost", not just to the port, so conventional workarounds as with adding a dot to the hostname don't work. Solution seems to be here. Note the last part of the selected answer: Use "localhost.fiddler" and Fiddler will emit "localhost" when proxying.
Rick Strahl has a good article on this here: http://www.west-wind.com/weblog/posts/2009/Jan/14/Monitoring-HTTP-Output-with-Fiddler-in-NET-HTTP-Clients-and-WCF-Proxies
Pretty sure a winforms app will usually pick up the default system proxy as set by fiddler. Are you operating on localhost? Try connecting to your machine name.

WCF, GET and HTTPS

I have an WCF REST service with only GET access. I'd like to make it obligatory to use SSL only on several of the service functions.
How can this be accomplished?
Thanks!
Intermixing HTTP and HTTPS on the same svc file isn't possible. You need to have an svc file that only talks HTTPS and one that talks HTTP. From my experience trying to get a specific WCF svc to respond in a mixed manner has been impossible.
You need make bindings with using HTTPS protocol + use SSL certificate on IIS