[Banshee-devel-list] Mono.Upnp on Windows



Hi! I am trying to get (and have succeeded) Mono.Upnp running on
Windows (MS runtime). Unrelated to Banshee. But it looks like you guys
are the stake-holders.

Mono.Upnp makes a bit of use of HttpListener. Specifically, opening it
on random ports. This cannot really be done on MS .Net. Vista and
above have a 'urlacl' thing as part of the HTTP.SYS driver (which MS's
HttpListener uses), which requires URLs to have permissions
preconfigured: with the port number hard coded. This cannot work.
There's no way to grant permissions to a given app to open a url on
any odd port. So, Mono.Upnp of course fails with an
AccessDeniedException.

So, I fixed this. But the only way I could fix it was to introduce a
private implementation of HttpListener. Essentially, I copied Mono's
HttpListener (which just uses plain sockets, yay) into a new namespace
Mono.Upnp.Http; hacked it up a bit, and am now using it. It works. Go,
me!

So clearly I'd like this "fixed" upstream. Except the fix sucks. But I
cannot come up with any better idea. I could strip down HttpListener
to the bare minimum required for Upnp. But still, it's duplication.
Annoying duplication.

Do you guys care about Mono.Upnp being used in the MS runtime? If so,
then, I'd appreciate advice on how best to solve this that you're
happy with. If you don't care, then I guess I'll just maintain my
obnoxious fork.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]