-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Description
I have a MAUI app where I'm trying to load a web application in WebView control. I need a web server on a particular path to serve the files which are part of index.html. I am using Embed.IO package to create a web server since it's cross-platform, but I'm facing a "Platform Not supported" exception in MAC. (It works fine in Windows).
Here is how I'm starting the web server
private WebServer _server;
public void StartLocalServer(string url, string webAppPath)
{
try
{
_server = new WebServer(x => x
.WithUrlPrefix(url)
.WithMode(HttpListenerMode.EmbedIO))
.WithStaticFolder("/", webAppPath, true); // Serve files from the webAppPath
// Run the server
_server.RunAsync();
}
catch (Exception ex)
{
}
}
The exception I get in MAC OS is
The MAC OS is Sonoma 14.5 and chip is Apple M1 Pro.
Any help in solving this is appreciated.
bbenetskyy
Metadata
Metadata
Assignees
Labels
No labels