Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
asp.net Web API を使用してリソースの URL を生成しようとしています。サイド ApiController ではかなり簡単にそれを行うことができますが、ApiController コンテキストにいない場合はどうでしょうか?
長い道のりは、リクエストを取得し、プロパティ コレクションから Configuration と RouteData を掘り出し、自分で ControllerContext を作成してから、UrlHelper を使用して Url を一般化することです。
もっと簡単な方法があるかもしれませんが、私はまだ見つけていません。