-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running with the debugger does not respect LocalHttpPort in local.settings.json #584
Comments
can you see if this works for you from my reply on https://stackoverflow.com/a/44977350/3234163 the command line takes precedence over the settings file, the problem is that VS passes an explicit port on the command line. work around is to go through |
@ahmelsayed Thank you for the work around! It works. I am still going to leave this ticket open because I feel running a function app from within visual studio should be respecting that setting. Maybe it should check the local.settings.json file and if the host is defined don't pass in a port to |
Awesome! thank you for confirming. I'll close this issue then. |
@ahmelsayed I spoke too soon, the the problem still persist just with a different part. The debugging port is now in use. The second program to start fails with
Please reopen the ticket. |
you can change that port by specifying |
Setting the port fixed the issue, I have opened a issue on the cli repo about getting it added to local.settings.json (and helped someone who was having the same problem in their issue tracker too) |
OK I am confused here, please help me out. Why have a setting for |
Additionally, setting
|
@ahmelsayed can you address the issue that @Mike-EEE is reporting when trying to use the |
This is a known issue. Please see here for the workaround |
Apologies closed too soon. |
@Mike-EEE I'm assuming you're running v2? this issue was for v1. There are some differences in how VS loads things between the 2. |
Great! I am not sure how I didn't see that post in all my searching. That is exactly what I was looking for...thank you, team! Please feel free to close this issue. :) |
Closing again per customer request. |
Hey guys, how to use |
@s-KaiNet can you try running this command outside of visual studio and see if it works there?
the first time you run this it needs to ask for elevation to register the urlacls with https.sys. Alternatively you can also run netsh http show sslcert 0.0.0.0:<yourPort> #default 7071 You should see something like
If you don't, you can run this internal CLI command yourself to register the cert with http.sys from an elevated cmd using
|
You can see what this command does here
It generates a self-signed cert for localhost, adds it to your cert store then runs
|
self-cert is the cause of the issue indeed.
I beleive I should create an issue in func-core cli repository... |
Can you please open an issue here https://github.com/Azure/azure-functions-core-tools/issues |
In the console window you will see
You can see that the function is running on port 7071 and not on our custom 7072
If you start another function app with
"LocalHttpPort": 7073
set as the setting you will get the error messageAttached is a basic repo using the same steps listed above.
ExampleApp.zip
The text was updated successfully, but these errors were encountered: