{"id":2095,"date":"2016-12-22T10:32:17","date_gmt":"2016-12-22T09:32:17","guid":{"rendered":"http:\/\/blog.repsaj.nl\/?p=2095"},"modified":"2016-12-21T14:42:54","modified_gmt":"2016-12-21T13:42:54","slug":"azure-debugging-azure-functions-could-not-register-url","status":"publish","type":"post","link":"http:\/\/blog.repsaj.nl\/index.php\/2016\/12\/azure-debugging-azure-functions-could-not-register-url\/","title":{"rendered":"[Azure] Debugging Azure Functions: could not register URL"},"content":{"rendered":"<p>It&#8217;s still in the works, but the Azure Functions team released a preview version of the &#8220;Visual Studio Tools for Azure Functions&#8221;. At this time, you&#8217;ll need VS2015 Update 3 installed to get this to work, check out\u00a0<a href=\"https:\/\/blogs.msdn.microsoft.com\/webdev\/2016\/12\/01\/visual-studio-tools-for-azure-functions\/\" target=\"_blank\">https:\/\/blogs.msdn.microsoft.com\/webdev\/2016\/12\/01\/visual-studio-tools-for-azure-functions\/<\/a> for further instructions.<\/p>\n<p>So all excited I downloaded the tools, installed them and created my first local Function to debug from Studio. Unfortunately, it didn&#8217;t work. I got two command prompt windows which disappeared after a short while. No error, no debug, nothing. Hmmm&#8230;.<\/p>\n<p>A good next step is to run the functions CLI locally. You&#8217;ll need to have the <a href=\"https:\/\/www.npmjs.com\/package\/azure-functions-cli\" target=\"_blank\">CLI<\/a> installed for this. Simply head over to the folder where you&#8217;ve just created your project and run &#8220;func host start&#8221;. In my case, this resulted in the following error:<\/p>\n<blockquote><p>&#8220;HTTP could not register URL http:\/\/+:7071\/. Your process does not have access rights to this namespace&#8221;<\/p><\/blockquote>\n<p>You can assume that Visual Studio is facing the same issue, as it is also using the CLI underwater to host the functions. So what now? I found that the following command will list all of the registered http services:<\/p>\n<pre class=\"lang:default decode:true \">netsh http show urlacl &gt; c:\\http.txt<\/pre>\n<p>Check that http.txt file and you&#8217;ll see there probably is an entry for\u00a0http:\/\/+:7071\/ in there. \u00a0I had nothing running on that port as far as I was aware so I decided to simply delete the reservation:<\/p>\n<pre class=\"lang:default decode:true \">netsh http delete urlacl https:\/\/+:7071\/<\/pre>\n<p>And there you go, the port is now freed up and both the CLI as well as debugging from Visual Studio (not at the same time, obviously) started working! \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s still in the works, but the Azure Functions team released a preview version of the &#8220;Visual Studio Tools for Azure Functions&#8221;. At this time, you&#8217;ll need VS2015 Update 3 installed to get this to work, check out\u00a0https:\/\/blogs.msdn.microsoft.com\/webdev\/2016\/12\/01\/visual-studio-tools-for-azure-functions\/ for further instructions. So all excited I downloaded the tools, installed them and created my first local<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[34],"tags":[78,168,183],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3KFR1-xN","_links":{"self":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts\/2095"}],"collection":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/comments?post=2095"}],"version-history":[{"count":0,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts\/2095\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/media?parent=2095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/categories?post=2095"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/tags?post=2095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}