-
Notifications
You must be signed in to change notification settings - Fork 2
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
When deployed to Azure I get: "the app is unable to listen on the specified URL"" #3
Comments
The localhost URL is not routable. That's for debugging on your local
machine. When you deploy, you have to change that to the base address of
your deployed app. For example https://mydeployedapp.azurewebsites.net
…On Sun, Sep 29, 2024 at 12:31 AM Mark Evans ***@***.***> wrote:
I've been stuck on this problem for a week and I have no idea what to try
next. I've checked all the configuration. It works fine on my local machine
but when deployed to Azure I get the error:
MSAL.NetCore.4.64.1.0.MsalClientException:
ErrorCode: http_listener_error
Microsoft.Identity.Client.MsalClientException: An HttpListenerException occurred
while listening on http://localhost:52140/ for the system
browser to complete the login.
Possible cause and mitigation: the app is unable to listen on the specified URL;
run 'netsh http add iplisten 127.0.0.1' from the Admin command prompt.
---> System.Net.HttpListenerException (5): Access is denied.
The error is raised on this line of code:
PCA = PublicClientApplicationBuilder
.Create(_settings?.ClientId)
.WithB2CAuthority(_settings?.Authority)
.WithRedirectUri("http://localhost")
.Build();
Help!!!!!!!
—
Reply to this email directly, view it on GitHub
<#3>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALK4DC57PG2CJYMW5ESBFTZY57B7AVCNFSM6AAAAABPBHTP3OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2TINRZHE3TKMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for the help Carl. I really appreciate it. And also thanks for all your help over the last 20 years or so. I started my career with DotNetRocks at the beginning of DotNet and you've been a huge inspiration all these years. I really don't know what I'm doing wrong here. I changed the above code to:
I also tried putting this URI in the "Single Page Application Redirect URIs" and also the "Web Redirect URIs". When running the app either locally or remotely I get:
I've tried setting http://localhost:1234 in the app and in the AD settings but that doesn't seem to work either. Tomorrow I'll start all over and download your code and configure AD from scratch. Then I'll try your suggestion again. I've messed around with so much stuff in the last week that maybe I've changed up some other setting. Thanks again Carl. Love your work! |
I've just gone through this again and the result was the same. I followed these steps:
to this:
I'm completely out of ideas now :( Please help me. |
I've been stuck on this problem for a week and I have no idea what to try next. I've checked all the configuration. It works fine on my local machine but when deployed to Azure I get the error:
The error is raised on this line of code:
Help!!!!!!!
The text was updated successfully, but these errors were encountered: