question

ArpithaAradhya-5537 avatar image
ArpithaAradhya-5537 asked ·

Azure asp.net c# web publish with authentication will not connect to localhost (refused)

Dear Expert,

I'm new to Azure Web application development and used the guide https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-dotnet-sqldatabase to create a new web application.

I have used Authentication with work or school account to login to the web page. When I publish the application, I successfully login using the Microsoft account.2552-error2.jpg

To check if localhost is working, I press Ctrl +F5 the localhost works but when I click publish it does not work with the Azure URL after authentication. What can be the reason? How can I fix it? I also have validated connection in Publish settings.Only this error occurs when I add authentication step 2561-error.jpg

Without Authentication, after publish with azure URL localhost opens,


2472-error3.jpg


azure-webapps-ssl-certificatesazure-webapps-developmentazure-webapps-content-deploymentazure-webapps-authentication
error2.jpg (86.4 KiB)
error.jpg (19.4 KiB)
error3.jpg (98.8 KiB)
1 comment
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ArpithaAradhya-5537

I just want to make sure I'm understanding correctly; when you publish your app, the login experience returns ERR_CONNECTION_REFUSED? If that's the case, did you add your published URL to the list of Reply URLS in your AAD App Registration? To help diagnose your issue, can you attach an .har file capturing the requests?

Regards,
Ryan

0 Votes 0 · ·

1 Answer

DSPatrick avatar image
DSPatrick answered ·

Also reach out to subject matter experts in dedicated forums over here.

https://forums.asp.net/1247.aspx/1?Azure+and+ASP+NET

https://forums.asp.net/37.aspx/1?C+


Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.