Creating a web server in C# UWP

前端 未结 3 1152
臣服心动
臣服心动 2021-01-12 04:58

I am writing a web server as a Universal Windows Platform app in C#. Here is my code so far:

sealed partial class App : Application
    {
        int port =          


        
3条回答
  •  别那么骄傲
    2021-01-12 05:08

    It is possible to host a web service in a Window Universal App. I followed the example from http://www.dzhang.com/blog/2012/09/18/a-simple-in-process-http-server-for-windows-8-metro-apps , also followed the three first steps from Raymond Zuo's solution and finally I also put the firewall down. Unfortunately, I was not able to run on localhost even though I followed the answers from here Cannot connect to localhost in windows store application . I am currently doing java http requests to the Universal Platform App. Definitely, server and client seem to be required to run on different hosts.

提交回复
热议问题