When website default domain redirect through httpredirect to hosted application page. In application when button open some page in new tab then session got null.
Related
I have an ASP.NET core web app with React registered in Azure Active Directory, how can I let the user go back to the original url after login redirect?
For example when I share with another user a link like this:
https://myapp.azurewebsites.net/#/route/subroute/254
the user is redirected to the login page
https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize?client_id=***&redirect_uri=https%3A%2F%2Fmyapp.azurewebsites.net%2F.auth%2Flogin%2Faad%2Fcallback&response_type=code&scope=user.read%20openid%20offline_access%20profile&response_mode=form_post
the login works fine but after authentication the user is redirected to the home page
https://myapp.azurewebsites.net/#/
but I want redirect user back to the previous page
https://myapp.azurewebsites.net/#/route/subroute/254
I used this link for the app configuration
https://learn.microsoft.com/it-it/azure/active-directory/develop/scenario-web-app-call-api-app-configuration?tabs=aspnetcore
For the app registration I try these redirect uri:
https://myapp.azurewebsites.net/signin-oidc
https://myapp.azurewebsites.net/.auth/login/aad/callback
Please can you help me?
I have setup following as redirect URI's under registered app:
https://localhost:44332
https://myserver.com/v1/myapp
When I run the app locally and using localhost redirect URI, click on "signin/signup" its redirecting to b2c login page and successfully redirects to localhost.
But if I run app where its deployed "https://myserver.com/v1/myapp" and uses https://myserver.com/v1/myapp as redirect URI, and click on "signin/signup" it just reloads same page and not redirects to b2c login page.
I have tried to debugged same scenario and if uses https://myserver.com/v1/myapp my breakpoint doesnt hit "OnAuthorizationCodeReceived" but works as expected when uses localhost as redirect uri.
Basically I want user to browse app as https://myserver.com/v1/myapp, click on "Signin/Signup", provide b2c credentials and rediects back to https://myserver.com/v1/myapp as a logged in user.
what I missing here if redirecting users to server address instead localhost?
I have found the issue, it was due to mismatch reply uri (under app registration) and RedirectUri setup in web.config. These uri should match exactly once I have modified its able to redirect to b2c login page.
I am unable to login to CMS admin portal. It's redirecting to https: and giving me an error saying site cannot be reached.
Your web.config had a rule in it or your site settings are setup to redirect admin interface to SSL.
To resolve the issue:
remove the web.config entry
run a query directly against the database table cms_settingskey and update the key value to false.
I am using Netbeans J2EE. When put href="www.google.com" in a button in my web application I get http://localhost:8084/www.google.com in the address bar. Thus, I can't access to google. What should I do to get out of the localhost and redirect to any external web site?
I am developing an intranet site hosting RESTful services via ASP.NET WebAPI.
I am having an issue where all browsers (Chrome, Firefox and IE) are displaying a login prompt requesting credentials. I am hosting the site in IIS 7.5 on Windows 7 Home Premium with Anonymous Access enabled.
The root URL http://localhost/RootAPI/ should be viewable to anonymous users, but the private routes, e.g. http://localhost/RootAPI/Invoice and http://localhost/RootAPI/Order should be accessed only to authenticated users via the [Authorize] attribute. I am intending to control the authentication process using WebAPI calls via AngularJS once I have fixed this issue.
My website uses the ASP.NET v4.0 app pool identity and I have assigned read permissions to the application's folder for this user.
I have also added http://localhost to the list of trusted sites in IE as well as checking the 'Allow Integrated Windows Authentication' in the Advanced options in IE. Furthermore, the 'Automatic login with current user name and password' is checked in the custom level for the Intranet sites and the issue still persists.
I have got this in my web.config file.
<authentication mode="None" />
<identity impersonate="true" />
When viewing the log files under C:\inetpub\logs\LogFiles\W3SVC1 it does not display the user name (I was expecting to see the anonymous user name) and shows HTTP status 401.
I've spend two days on this frustrating issue and I cannot stop the logon prompt from appearing. Can anyone point me in the right direction as to what I am doing wrong?
I managed to figure this out after discovering the custom authorization filter was being executed and was checking to see if the controller was decorated with [AllowAnonymousAttribute()] and it wasn't.
After adding this attribute to the root controller I no longer received login prompts.
This is what the root controller looks like after adding the attribute filter:
[AllowAnonymousAttribute()]
public class RootController : ApiController
{
...
}
The root page now displays as expected.