2016年12月23日金曜日

Nancy UrlReservations.CreateAutomatically: SYSTEM not in Everyone

Nancy で UrlReservations.CreateAutomatically = true を使いますと、URL を http.sys に予約させることができます。

    予約済み URL            : http://+:11411/
        ユーザー: \Everyone
            リッスン: Yes
            委任: No
            SDDL: D:(A;;GX;;;WD)

デバッグ環境では大変便利なのですが、ここに落とし穴が…

サービスはだいたい SYSTEM アカウントで動きます。

http://stackoverflow.com/a/24976524
Your service is running (most likely) under the LocalSystem (SYSTEM) account. This account is not in the Everyone security principal.
SYSTEM は Everyone に含まれないそうです。そこで、サービスを動かす前に予約済み URL を削除しないといけません。

netsh http delete urlacl url=http://+:11411/

0 件のコメント:

コメントを投稿