Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Browser can't reach my app (but HttpClient can) #4

Open
ShacharWeis opened this issue Aug 5, 2016 · 3 comments
Open

Browser can't reach my app (but HttpClient can) #4

ShacharWeis opened this issue Aug 5, 2016 · 3 comments

Comments

@ShacharWeis
Copy link

ShacharWeis commented Aug 5, 2016

I have a tiny web server running in my app that uses this project.

If I test it with an HttpClient that I create in my app, it works.
But from the outside, from my browser, I can't reach the server.
Browser is on the same Win10 computer, firewall is turned off.

Any ideas?

@williamsharkey
Copy link

Seems like a router/ firewall issue, or just lack of experience with
setting up a webserver. IE - I think this issue probabbly does not have
anything to do with this project.

Are you able to access your webserver from outside world if you use a
standard microsoft technology like an MVC project? I would bet that you
would not, because I don't think this related to the code.

Are you aware that you need to find out what your computer's ip to the
external world is to access it externally, and have that port open to the
outside world. If you are very new to this area, I would suggest not using
this custom code, and use a more popular framework because there will be
more support for beginners.

On Fri, Aug 5, 2016 at 10:40 AM, ShacharWeis [email protected]
wrote:

I have a tiny web server running in my app that uses this project.

If I test it with an HttpClient that I create in my app, it works.
But from the outside, from my browser, I can't reach the server.

Any ideas?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#4, or mute the
thread
https://github.com/notifications/unsubscribe-auth/ABB3Wkr8x0f9kKAnPkOAZF1hvZA8ZCJ8ks5qc0t7gaJpZM4Jdv1k
.

@ShacharWeis
Copy link
Author

Did you even read my post?

This is not a router/firewall issue. Everything is on the same computer. There is no "webserver to setup". I'm using this project - HttpListerner - in my code. It listens to http requests. Requests that are coming from INSIDE the process are answered, requests that are coming from outside are ignored. This is an issue with UWP sandboxing or something similar, and since this project is supposed to run on UWP it is relevant.

@marinasundstrom
Copy link
Owner

marinasundstrom commented Nov 6, 2016

Sorry for not answering earlier. I discovered this issue a bit too late.

By default, the manifest enables the capability to communicate via Internet and public networks (internetClientServer). Any problems are, therefore, probably about firewalls or policies. UWP is, as you know, sandboxed and everything is not enabled by default for security reasons.

In order to make this work within your localhost you have to add an exception to enable loopback (this is what Microsoft has done for Edge). When debugging, this is easy to enable: Just check the option in the Debug tab in Project properties. To do this on a Release build you might have to script it with PowerShell. I think that Fiddler (the proxy) might help you with this too.

I hope this might help others who have encountered the same problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants