unable to configure any security with basicHttpbinding in wcf test client - c#

I've been working with wcf library project and I cannot test my project in wcf test client with security settings for basicHttpBinding either message or transport.

You can use SoapUI, it is a proper tool for testing wcf services in both http & https mode
the site is:
http://www.soapui.org/
you can see tje feature here:
http://www.soapui.org/About-SoapUI/features.html

Related

WCF Routing Service with NetTcpBinding and certificates

We want to add fail over ability to our WCF clients at the client side . The clients are communicating to a WCF service that is implemented over NetTcpBinding with TransportWithMessageCredential security mode and the credential type is certificate.
Is it possible to use .Net 4.0 RoutingService without changing the real service security at all ?
The desired functionality from the router is just to pass the messages from the client to a backup service if the primary service is unavailable.

Using reverse proxy to configure IIS hosted WCF services with SSL(https)

I have some WCF service hosted in IIS. Client (silverlight application) is consuming the service over http. Now I want to configure that service with https/SSL.
I can see there are multiple options for that.
This is the standard way.
https://msdn.microsoft.com/en-us/library/hh556232(v=vs.110).aspx
Using reverse proxy (URL rewrite)
http://weblogs.asp.net/owscott/creating-a-reverse-proxy-with-url-rewrite-for-iis
My client would send the request over https & reverse proxy server (IIS) would change/route https service request to http.
Please note my silverlight client only consumes the WCF service. There is no other client which is using that WCF service.
Can anybody tell me what is the recommenced way? What would be the advantage/disadvantage of using reverse proxy to configure WCF service with SSL?
Atul
Although you can use URL rewrite(reverse proxy) to enable https but it is not exactly meant for that. It is mainly used to explore some internal URL to external world
You should use the standard approach (mention in #1) to enable SSL.
Annu

Why can't my test client connect to my WCF rest service?

I have a simple wcf rest service. I can test it ok using the WCF Test Client.
I created a test client of my own via svcutil.exe. This builds and runs. However, it always gives this exception when instantiating the service object:
Could not find default endpoint element that references contract
'IBookService' in the ServiceModel client configuration section. This
might be because no configuration file was found for your application,
or because no endpoint element matching this contract could be found
in the client element.
I'm basically following the tutorial here:
http://www.codeproject.com/Articles/571813/A-Beginners-Tutorial-on-Creating-WCF-REST-Services
I also cannot access the endpoints via a url when running it locally. It's unclear to me why this tutorial has a .svc file in the url when trying to access the service from a browser though. I have no .svc files anywhere.
The WCF Test Client is for testing SOAP-based services (those services using any binding other than webHttpBinding in WCF).
The WCF Test Client however is NOT capable of working with REST services.
For REST, use something like Fiddler instead.

Hosting a WCF webservice and WCF Net.Tcp service in the same IIS container?

I'm trying to build a system which consists of:
A centralized IIS component
A Client application written in .Net
A Third party application.
The .Net Client should on startup connect to a WCF Net.Tcp Binding on the IIS application and register it's self as a consumer of requests (Callbacks).
The Third party application will then make Web Service calls to the IIS server which will farm out the request to the .Net Clients.
How do I host mutliple WCF services IIS? Is this possible?
I assume that I'd have to instantiate the services in the web.config as endpoints but I'm not sure how to do this.
You could use multiple SVC files hosted within the same application or you could use MVC-style Routing to establish the multiple ServiceHosts.
Here is an MSDN example on hosting WCF within IIS using web.config and SVC files.

Silverlight Accessing WCF and CrossDomainAccessPolicy without IIS

I have a Windows Service that exposes a WCF service and so I'm not using IIS. I'm suddenly getting the famous SecurityException that mentions using a cross-domain policy when I try to access the service from a Silverlight app. However, since I'm not using IIS, does that mean I need to have a web server on the same port as my WCF service just to serve this file? Is there a better way to do it?
You can add another service with webHttpBinding (REST) that serves out ClientAccessPolicy.xml file. Then in your Windows Service, you can start that endpoint along with the other one so that Silverlight clients can get the cross-domain policy file. You can find more information in below links:
Step By Step - Using Silverlight to Access a WCF Service Hosted In a Console Application
Self hosted WCF service and enabling cross domain calls

Categories