views:

45

answers:

2

Is it possible to deploy with ClickOnce a WPF app that calls one or more WCF services?

It is a "normal" WPF app, not an XBAP WPF.

Does anyone has an example?

+3  A: 

Not sure on the question.

I have a working WPF app that acts as a client to several WCF services. It is deployed via ClickOnce.

However, the deployment medium (clickonce) and the design pattern (WCF) really aren't related when you are talking about the client.

What are you trying to do, and what problems are you having?

Taylor
I only want to deploy the WPF client with ClickOnce. But the WPF client has to know where it can find the WCF service. Its address.
TTT
Just embed this in the normal app.config location, like you would for any WPF app that wasn't being deployed in this way. ClickOnce moves this with the app and its manifest (in a file called app.config.deployment) and it will be referenced by all installs of the client.If you are needing something more complex, like a URL that changes based on certain parameters, then you'll need to take a different approach.For that, I usually design the client with a 'call-home' URL, which is a simple service they call with some details and receive config info, such as endpt urls. hope that helps.
Taylor
+1  A: 

Sure you can. A normal WPF app is just like WinForms. Consuming WCF services is behaviour that is allowed.

I don't have any samples by hand but simply googeling for standard ClickOnce Deployment should bring give you plenty of tutorials

Noctris