Change WCF address in Windows Universal App from development to production environment

Asked

Viewed 44 times

1

I am developing an application in Universal Windows App (for Windows 10, Windows 10 Mobile, etc), which basically this application makes the consumption of data that are in the service running in WCF.

It turns out, I own a unique solution where there I have the WCF service and my Windows App application. When I run this application in development environment, everything goes perfectly, even, because the service is running in host location.

What would make it easier for me would be the fact that when making a Pulish of the service, the system automatically changed the server address settings to the production one. What in the WCF case I got

Only the same could not for Windows App. That is, I would like to re-point the address of the WCF service within this Windows App during the Deploying process.

Note: I already managed this in a Webapp (Asp.MVC) where just change the web.config

My question is, how do I do this in a Windows App on Windows 10 / Windows Phone?

I know I could do this from scratch during the Visual Studio Add Reference process, just by pointing out the production server address. But in practice it’s not very fluid

1 answer

0

Hello,

I have a WCF test and a Production WCF, like you. I developed a WP8 application that has a settings screen, among other information has the WCF URI input. Uri is set in app.xaml.Cs and is saved to an xml file in the device’s isostore. Whenever I start the application I read the URI of the XML file. If you need to restart the settings, rewrite the information set in app.xaml.Cs.

I hope it helps you.

Abcs

:ioz

  • Yes, but this is not so fluid in practice. In a webapp this is possible. I don’t see why the difficulty in a Windows App.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.