Last post Apr 20, 2014 01:23 PM by mou_inn
Apr 15, 2014 03:03 PM|mou_inn|LINK
in B2B scenario i want only my own client will be able to access my wcf service. my wcf service will be publish in internet but some how other know my service url or mex url then they will not be able to create proxy of my service. i will only provide my
service proxy or contract assembly to my customer manually and then only my customer can consume it. so guide me how could i develop this kind of secure service where other people will not be able to interact with my service. thanks
Apr 16, 2014 10:22 AM|Illeris|LINK
It is practically impossible to make a WCF service visible only for one user/client. However, it is possible to control who as access and who has not. The mechanisme is called "authentication". For your case I'd recommend certificate based authentication.
This allows you control exactly what client can access your service, even from what device. This this site for more info : http://msdn.microsoft.com/en-us/library/ff648360.aspx
Apr 17, 2014 03:49 AM|mou_inn|LINK
i did not mean that wcf service visible for one client rather i do not want to visible my service for any client. i will provide my contract to client just to create proxy and consume my service. so guide me how to proceed. thanks
Apr 17, 2014 09:59 PM|Fuxiang Zhang - MSFT|LINK
According to your description, I see you donot want someone who isn't your client can access your wcf metadata.
For this issue, I suggest you set the metadata accessable as false, in other word, donot publish your metadata to internet.
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
Then all outer users cannot access service metadata, so you should send your contract assembly to your client for them creating service by proxy.
On the client side, you can use the ChannelFactory<Channel> to create service proxy like below.
= new ChannelFactory<ISampleServiceChannel>("WSHttpBinding_ISampleService");
// Add the client side behavior programmatically to all created channels.
ISampleServiceChannel wcfClientChannel = factory.CreateChannel();
For more information about client using ChannelFactory, please refer to below.
Hope that helps, thanks.
Apr 18, 2014 06:40 AM|Illeris|LINK
There are two options:
If the concept "only clients" is necessary, hiding your service is not enough. Ask MSFT : how many times the iso download links to their MSDN software downloads have leaked... ;-)
Apr 20, 2014 01:23 PM|mou_inn|LINK
if i just write
that means meta data will be disable ?
i like to know that if i have mex endpoint but httpGetEnabled="false" then what does it mean? no body will able to see my meta data.......if yes then what is the importance of mex endpoint?