none
Use http client with a apache webserver RRS feed

  • Question

  • Hello,

    I have made an scoreboard app on the raspberry pi 3 with windows 10 iot core, now i want to show a live score over the internet on a website.

    I have been playing around with the sample httpclient (https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/HttpClient) and i got it work on my local webserver.

    Now i have a website that has a apache webserver, is it possible to use it with that?.

    In the readme file of the sample httpclient i reead the following but i don't understand it.

    However if a server different than IIS is used, then this requires some special configuration of the server to create the HttpClientSample folder.

    Copy the Server\webSite directory to the HttpClientSample folder on the web server and configure the server to allow GET and POST requests.

    To configure the sample for use with a web server different than IIS not using localhost:

    The target URI field should be updated. This can be handled in two ways. The AddressField element in the HTML or XAML files can be edited so that the URI is replaced by a URI for the non-IIS server. Alternately when the app is run, enter the URI to access on the web server instead of the default value in the Address textbox.

    If i upload the website folder to my website for example 'www.example.com/livescore' and change the url in the httpclient sample, it gives no error, but when i go to 'www.example.com/livescore' it gives the error

    Error occurred: 403 - forbidden

    Can maby someone help me please?


    Wednesday, August 16, 2017 7:25 AM

Answers

  • Hi A.Pols,

    The MS official code sample just gives you a simple sample on how to use HttpClient to access a website. You said your website was hosted on apache server, then what you need to learn is how to configure your website and make it to be access to the outside world.

    It’s actually not a UWP development issue, maybe, this document about “Set up a hosting environment for ASP.NET Core on Linux with Apache, and deploy to it” would be helpful to you. It’s just for your reference.

    If you still cannot solve this issue, you might need to learn more configuration technology on apache. You’d better ask on apache relevant forums.

    Best Regards,

    Xavier Eoro


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, August 17, 2017 2:39 AM