문제

I'm trying to self-host some static files on my C# app using Microsoft Owin. It works perfectly well in both IE (for once...) and Firefox, but Chrome doesn't, it's like it's not even trying to connect (I can't see any traffic in Chrome's dev tools).

The problem, of course, is I specifically need it to work on Chrome.

Owin seems a mature project, and I can't believe I'm the only one having this problem, yet I can't find anyone else having the same so I must do something wrong.

This is the code:

const string url = "http://localhost:6667/";

var fileSystem = new PhysicalFileSystem(webSiteFolder.FullName);

var options = new FileServerOptions
{
    EnableDirectoryBrowsing = true,
    FileSystem = fileSystem,
};

_server = WebApp.Start(url, builder =>
{
    builder.UseFileServer(options);
});

Console.WriteLine("Listening at " + url);

Any clue?

Thanks!

도움이 되었습니까?

해결책

use another port, for example 5000

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top