none
publish WCF for UWP application RRS feed

  • Question

  • I'm create the UWP application that mainly focus on windows phone. There is the process I have to deal with Azure SQL database and I have ask and got the answer that UWP can't directly go for Azure database but it's possible if we use WCF to deal with. Then I create the WCF file in the same solution call as 'Testing' (Contain 2 project now which is main universal app and WCF app service) now here is the problem I can run my code normally and get the data from the WCF in the local machines but it's crash when I run it on the real window phone device. I have ask and know that it's need to publish WCF and set the right endpoint address of the client in the app. But I don't know how to do its

    I'm try to reading https://msdn.microsoft.com/en-us/library/bb924407%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    but it didn't make me understand in many point such as I don't know which target, I don't know how to set address endpoint.

    I'm very new to this so I would like to ask a step to perform it.

    Thank you

    • Moved by Weiwei Cai Friday, March 25, 2016 3:26 AM not VS IDE issue.
    Thursday, March 24, 2016 10:44 AM

Answers

  • Hello,

    According to your description, it seems that your service address is a localhost address, so you can access it from the local machine, but it does not work in the real device.

    In order to make your WCF Service to be accessed from a real device, you need to modify your service address. One way is that you can use the IP address instead of the localhost and please make sure that your port does not be blocked by the firewall.

    The other way is that you can deploy your WCF service on Azure, after that you can consume your WCF Service from the Internet/real device. For more information, please refer to the following article:
    https://blogs.msdn.microsoft.com/nishasingh/2012/12/04/creating-and-deploying-a-wcf-service-on-windows-azure-and-consuming-it-in-windows-8-store-app/ .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.




    Saturday, March 26, 2016 3:26 PM
    Moderator

All replies

  • Hi Wichaya,

    This forum is discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    Since your problem is more related to publish WCF, I help you move this thread to WCF forum for a better help. Thanks for your understanding.

    Best Regards,
    Weiwei

    Friday, March 25, 2016 3:25 AM
  • Hello,

    According to your description, it seems that your service address is a localhost address, so you can access it from the local machine, but it does not work in the real device.

    In order to make your WCF Service to be accessed from a real device, you need to modify your service address. One way is that you can use the IP address instead of the localhost and please make sure that your port does not be blocked by the firewall.

    The other way is that you can deploy your WCF service on Azure, after that you can consume your WCF Service from the Internet/real device. For more information, please refer to the following article:
    https://blogs.msdn.microsoft.com/nishasingh/2012/12/04/creating-and-deploying-a-wcf-service-on-windows-azure-and-consuming-it-in-windows-8-store-app/ .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.




    Saturday, March 26, 2016 3:26 PM
    Moderator
  • I have follow in an instruction and in the process of cloud create it occur. 

     The server could not retrieve metrics (Bad Request).

    What should I do or I can go on without caring about this


    Sunday, March 27, 2016 7:11 AM
  • Hello,

    >>I have follow in an instruction and in the process of cloud create it occur.
    The server could not retrieve metrics (Bad Request).

    Do you mean that you meet the error when you deploy the WCF Service on the Azure? If so, it will be better if you can post this question in the Azure forum:
    https://social.msdn.microsoft.com/Forums/azure/en-US/home?category=windowsazureplatform .

    If not, could you please tell us the detailed information about in which scenario that you meet the error?

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 5, 2016 1:47 AM
    Moderator