Alternative to HttpListener?

2020-02-10 03:39发布

I'm developing an application that is so far using HttpListener to provide a small standalone http server. However, I've recently discovered that HttpListener needs to be run as Administrator, which is not always going to be possible.

What would the best alternative be? I need http GET and POST, both of which are not simply reading/writing files on the filesystem, they need to run custom .Net code.

My research so far has brought up Cassini, but as far as I can tell, I would have to write a custom version. Is there anything else? In partiular something with the same interface as HttpListener, but that does not require Administrator privileges would be amazing!

7条回答
SAY GOODBYE
2楼-- · 2020-02-10 04:22

For .NET Core applications there exists a new (cross-platform) HTTP server implemention: Kestrel.

查看更多
登录 后发表回答