Restored Test DNN Website on localhost keeps redirecting to Test URL - iis-7.5

I restored the Test DNN Website and Database on local machine but still it is redirecting to Test Url.
Please help me run the DNN Website on Local Machine.
I change the PortalAlias, PortalSettings, webconfig pointing to Local Database. But still not resolved.
following message appears, when I enter my email for Login:
https://login.microsoftonline.com/XXXXXX-XXXX-44e7-XXXX-7de5c833XXXX/oauth2/authorize?scope=email&client_id=3b8a260d-PPPP-420a-PPPP-efd8cad8XXXX&redirect_uri=https%3a%2f%2fuattest.tio.com%2fLogin&state=Azure&response_type=code&login_hint=arsalan.amin#tio.com
https%3a%2f%2fdnn.localhost.com
https%3a%2f%2fuattest.tio.com
AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: 'XXXXXXXX-XXXX-420a-XXXX-efd8cadPPPPP'.

Configuration in .net framework generally we only need to modify the redirecturl.
Make sure the redirecturl in project same as azure portal, your issue should be solved.
Solution:
After you restored website, please check the RedirectUrl.
Click App registrations, and check Authentication->Platform configurations->Redirect URIs.

Related

Azure App Login Redirecting Back To Sign In Page After Successful Login

I wasn't exactly sure how to best describe the title of the question for the issue I am having, anyways this is the problem I am encountering, I have searched for a couple of hours and could not find an answer.
I am building and app which is passing through the Azure AD sign in and redirecting back after a successful handshake. All works fine when using https://localhost:port as my RedirectURI in Azure, for example:
Under Web Redirect URIs this following works just fine:
https://localhost:7280/signin-oidc
I login with my AD credentials and I am redirected back to my app's landing page, so all good there.
The problem is however, when I use the following in the hosts file, I am just redirected back to the Azure AD sign in page, even though when I check the azure sign in logs, it states the login was successful.
Question: Is it possible to use a custom URI using the hosts file in a local development environment, when developing an app passing through an Azure sign in? Or am I restricted to using https://localhost:portNumber for my web redirectURIs? Thanks in advance.
Here is the hosts file and the web RedirectURIs in Azure. As mentioned earlier, https://localhost:port works fine. Note: I already have an SSL Certificate for the local development environment which is fine.
My hosts file:
127.0.0.1 dev.operations.co.uk
My web redirectUri(s) in Azure which I have tested:
https://dev.operations.co.uk/signin-oidc
https://dev.operations.co.uk/

AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application:" xxx "

I have a use case for a project where I need to automate the creation of Application Registration on Azure programmatically.
I have been using this sample.
error screenshot
We seem to be facing an issue with Authentication for this App Registration code. We have checked the ReplyURLs with the urls in our App Settings. They are the same. What may be another reason for this occuring?
We also found another link on microsoft documentation where this thread seems to be open but have not found a solution there either. https://learn.microsoft.com/en-us/answers/questions/54102/the-reply-url-specified-in-the-request-does-not-ma.html
To deal with this kind of problem, you can try a general solution:
When you visit the application url , you will be redirected to the login page. Decode the authorization request url, you will find redirect_url, copy the value of redirect_url and paste it into the azure portal, and try again.
For the redirect URL, it should start with https, if you need to start with http, you must configure it as http://localhost.

Web App fails to return from Azure AD Authentication after deployment

I have a web app that is on a IIS 10 server. I am using Azure AD for authentication. Everything works fine in Visual Studio 2019. If I use the browser on the IIS server, everything works fine. It does not work on a browser on my workstation.
When I open the web app, it redirects to login.microsoftonline.com and finds my Microsoft account. It tries to redirect back but eventually says "Pick an account" "We couldn't sign you in. Please try again"
If I copy the parameter redirect_uri from the current page url, and put in a new browser, it brings me to my site authenticated.
Any help would be appreciated.
I found the issue. If neither https:// or http:// was entered in the URL, it assumed http://. Azure AD didn't like this. The solution was to add a URL rewrite in IIS to ensure https://

web policy agent not redirecting to OpenAM URl

I am working on OpenAM for the first time, i am following below link
https://backstage.forgerock.com/#!/docs/openam/12.0.0/getting-started.
i followed all the steps but when i click the agent URL i am not redirected to OPenAM URL. i am getting message :"it works".
agent URl:http://localhost:8088/
openAM URL:http://localhost:8080/OpenAM/
Using "localhost" is a recipe for trouble. OpenAM uses cookies, and needs a real FQDN to function properly. Note that guide that you reference uses "openam.example.com" when setting up OpenAM.
Please redo your installation using a proper FQDN. This may not be your problem, but you should fix that issue first before going further.

Issue Logging in to Azure deployed web app using while using CNAME redirect

I am running into an issue with logging into an ASP.NET MVC web site using Forms Authentication while running on Azure using a CNAME to redirect my domain to the url of the Azure application. For clarity on how I am setup the following blog post explains how I am setup. http://blog.smarx.com/posts/custom-domain-names-in-windows-azure
The problem:
When I enter my credentials and click submit on the login form, the login in the code successfully executes and redirects to the Home page however, it appears that the browser does not think it is logged in. I can tell this because a logged in user will only have the option to log out, but I am seeing the login link. So maybe it is my code right? Well maybe, and I hope it is but what I have noticed is that the problem only occurs if I am trying to login from my domain "www.MyDomain.com". If I use the Azure url mydomain.cloudapp.net, then the login in works fine. The other interesting part is if I login from mydomain.cloudapp.net and then navigate to www.MyDomain.com I see that I am logged in and everything works properly.
Please help.
Thank you very much,
Tom
It's hard to pinpoint your exact problem here. You can have a look at Lokad.Translate: it's a simple open source ASP.NET MVC app designed for Azure. It works with Forms authentication, and our implementation appears to be running fine with the CNAME redirects. You could try to reproduce our setup for your own needs.

Resources