HttpListener in Uno #8442
Replies: 2 comments 1 reply
-
|
In general, though, redirection is supported by |
Beta Was this translation helpful? Give feedback.
-
|
Hi, thanks for your reply. If I use HttpListener, I get the exception 'HttpListener is not supported on this platform' at the point the listener is started as you suggest. I hadn't tried HttpClient as I had only ever used it for sending requests, not listening and didn't realise that was possible. With regard to using WebHost and the .net core APIs, I get this: System.MethodAccessException: 'Attempt by method 'Microsoft.Extensions.Logging.Configuration.LoggerProviderConfigurationFactory.GetConfiguration(System.Type)' to access method 'Microsoft.Extensions.Logging.ProviderAliasUtilities.GetAlias(System.Type)' failed.' Googling suggests a version mismatch between Microsoft.Extensions.Logging and the version of .net standard being used (2.0 in this case). However, I am unable to make them match due to other package dependencies in the project. Thanks Dan |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
(repost from Uno discord channel)
Hi - what's the preferred way to listen for HTTP requests on the client in uno web assembly? We need to call out to an api which then redirects to a local address which we host. This was done in HttpListener for windows clients however it fails in web assembly as HttpClient isn't supported. Have also tried embedio's http listener implementation but that fails because it uses system.net.sockets which isn't supported. I attempted to use WebHost however, given that microsoft have changed the Api for hosting a web application in pretty much every version of .net core, it's very difficult to use any examples found online. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions