Detect WCF client open channel operation - wcf

I read the article in this site related to WCF Channel Listeners. I suppose that (correct me if I'm wrong), after a service opened a channel, it is possible to detect a request of connection made by a client. In practice I would like to detect when the client calls the Open method.
Could you tell me how can I do that please?
Thanks in advance.

For everyone interested in this question, I had an answer in this post.

Related

How does web browsing in a terminal services session work?

Specifically, how does the data from a web server get routed to the correct session when it is sent back to the terminal server.
Is the session ID sent as part of the HTTP headers?
There's a very good reason I need to know, but it's fairly complicated and not particularly relevant to the question.
Answered by Erik Philips in comments above.

NServiceBus and WCF

I want to achieve the following:
Expose WCF endpoint to client from which they request a long-running operation.
Map the inbound request to a NServiceBus Message.
Publish the message to the bus for processing.
Send a reply to the client acking that their request has been received and we will begin processing it.
Bus works the message through a handler.
Can you help me with some examples here please?
Thanks in advance
You can check out the WcfIntegration sample that comes with NSB to see how to expose an endpoint via WCF. To hand off the message, you can simply call Bus.Send() to another endpoint to do processing, then use the Bus.Return() that is in the sample. From there, the other endpoint can look just like the Server part of the FullDuplex sample without the Bus.Reply() logic.
Awhile ago I created some example code that is similar to this, although it used a traditional ASMX web service and not a WCF one, but that is really just an implementation detail.
Check out NServiceBus External WebService Example on GitHub.

Hide my WCF Method

I have a self hosted WCF service. Now if someone wants he/she can easily create a proxy and use my Methods. How to protect this thing. I want nobody outside my project can uses my Method. Please help me.
This has been discussed in many times.
One option you can be authenticate the clients using a username/password and protect the connection using ssl. This is good if the connection is over the internet.
Read this, this and this

WCF ServiceRouter & Transactions

How can I configure the service router to enable transactions, because the backend service uses them and this feature doesnt work since I introduced the ServiceRouter in the middle of the Client & Server dialog.
Thanks in advance
If you haven't figured it out, have a look at the IDuplexSessionRouter contract.
More information here.
Routing service is only intermediary. It doesn't participate in transaction. It is just something that should be as much transparent to client and service as possible.
Transactions in WCF are provided as additional messages send over wire. So my understanding is that if you are using router you must correctly route these messages as well. I have to say I have no idea how to do it without reading and fully understanding WS-AT protocol specification.
But maybe I'm wrong. In such case start with configuring routing service with transactional binding same as your client and service.

WCF over MSMQ not working

I have been tasked to implement a WCF service that makes use of NetMsmqBinding. I wrote the service and it works fine. The problem is that in the last minute they told me that there will be no Active Directory integration. So I don't know how to configure the security of the service. There is a VPN tunnel between the service's and the client's machines but they do not use the same active directory. Please advice. Any kind of help or tutorials would be appreciated.
The problem is that the service is not always online. That is why using WCF over MSMQ is preferred for this scenario. So I am sending one way messages through MSMQ - which works fine. My only problem is that I am new to WCF and am not familiar with WCF security. I would like to be able to sign and encrypt the messages since the information to be sent to the service is confidential. I would like to make sure that only authorized clients call the service. Any suggestions?
I'm not sure I understand your question so correct me, if I'm wrong. I have recently been woring on a WCF service that was hosted on a computer with no Active Directory available. We secured it using certificates. Is it an option for you? It's pretty painless (if you get past the 'put the certificate in the store and give the correct user access to it' part).
You should be able to take advantage of network transparency.
Use webservices to communicate from one system to the other. You might have to deal with extra latency, but it should still be usable.
Well first, you can use WCF's security, the WS-* stuff. Some info here:
http://blogs.msdn.com/motleyqueue/archive/2007/10/06/complementing-msmq-security-with-wcf.aspx
Second, you might find this blog to be helpful:
http://blogs.msdn.com/johnbreakwell/default.aspx
One of the articles there about cross-domain sending mentions this article (Cross-Enterprise Support):
http://msdn.microsoft.com/en-us/library/ms705127(VS.85).aspx
Which might help you configure it in general.
Thank you, Michael, but this information wasn't helpful...
I found this: http://www.codeplex.com/WCFSecurityGuide/Release/ProjectReleases.aspx?ReleaseId=14070 - a book from "Microsoft Pattern & Practices" which describes in detail the security in WCF - a must-read for every WCF developer.