开发者

Simplest code snippet to add a tiny REST endpoint to an Azure Worker Role

I would like to be able of adding a 开发者_运维技巧tiny REST endpoint to an Azure Worker Role, just dumping some non critical monitoring meta-data. I can think of many complicated ways of doing that, but I feel there are simpler solutions. What would be your code snippet to tackle this?


I suspect you want the HttpListener class: http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx. I've never used it, but it looks fairly trivial.

Watch out in Windows Azure for HTTP vs. TCP input endpoints (not sure which to choose here... depends on whether HttpListener uses http.sys) and making sure you bind to the exact IP address and port the fabric tells you to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜