unosquare / embedio

A tiny, cross-platform, module based web server for .NET
http://unosquare.github.io/embedio
Other
1.46k stars 176 forks source link

POST operation fails on Android (works on Windows) #523

Closed logikonline closed 3 years ago

logikonline commented 3 years ago

Describe the bug Unable to post a file to an embedIO server on Android

To Reproduce Steps to reproduce the behavior: Create a page that posts a file. After selecting the file, the server will report "(failed)net::ERR_CONNECTION_REFUSED"

Expected behavior The file should be received by the POST operation.

Additional context This works on my legacy server I wrote but want the nice options of embedIO. I use a WebApiController end point with a post.

rdeago commented 3 years ago

Hello @logikonline, thanks for using EmbedIO!

I'm no Android expert, but ERR_CONNECTION_REFUSED means that the client didn't even have a chance to send the request. More than an issue with file uploading, it may be something with your web server configuration.

Can you post your web server initialization code and the bare minimum HTML necessary to trigger the problem?

logikonline commented 3 years ago

I can close this, I found an answer on StackOverflow which using the IP rather than localhost allowed it to work. It was odd, it occurred on a few devices.

rdeago commented 3 years ago

@logikonline I'm glad you found a solution. Would you post the StackOverflow link here, to help others that may have the same problem in the future? Thanks!