Home > Forms Authentication > Forms Authentication Default Url Not Working

Forms Authentication Default Url Not Working


MVC or other routed applications might be OK if they use the standard ~/Account/Login style for logging in. Right now whenever you request the site, you always get the login page. I got it to work by enabling anonymous authentication on the [somestuff] and [morestuff] directories, and then disabling it on the individual files within these directories. The content you requested has been removed. navigate here

Specifically here’s what didn’t work for me: I have a forms auth setup that looks like this: After the Tuesday round of Windows update Microsoft is aware of this issue and they’re taking a look. The standard method to call after a successful Forms Authentication login is RedirectFromLoginPage(). System.Web.Security FormsAuthentication Class FormsAuthentication Properties FormsAuthentication Properties DefaultUrl Property DefaultUrl Property DefaultUrl Property CookieDomain Property CookieMode Property CookiesSupported Property DefaultUrl Property EnableCrossAppRedirects Property FormsCookieName Property FormsCookiePath Property IsEnabled Property LoginUrl Property

Asp.net Forms Authentication Returnurl

If you add in some code to handle the login control's LoggedIn event as follows: protected void Login_LoggedIn(object sender, EventArgs e) { FormsAuthentication.RedirectFromLoginPage(((TextBox)Login.FindControl("UserName")).Text.Trim(), ((CheckBox)Login.FindControl("RememberMe")).Checked); } And if according to This is causing problems on older applications that are missing some newer ‘dynamic’ configuration settings specifically dumped into the config file. I double checked a handful of older WebForms apps and all of them exhibit this funky behavior on this box. so that works.

You need to remove the 64-bit one as well if you're running on a 64-bit system. –Dylan Nicholson Oct 2 '13 at 23:00 add a comment| up vote 3 down vote Yes I ended up doing that. grep – show lines until certain pattern Previous examples of large scale protests after Presidential elections in US? Returnurl=%2f This is clearly a breaking change, but I suspect this will be a short lived bug that if indeed this is as universal as it appears to be it’ll likely be

B is already logged in, but not in the role required to view page XX. You still have the option of using the code in Listing 1 to redirect special cases as well. This problem arose suddenly. If this turns out to be not just a fluke I'm guessing this will be fixed in the next round of updates.

I've never used defaultUrl attribute in the forms node without any issues.

Forms Authentication Ignoring Default Document

User B tells everybody your site is broken, the login control doesn't work. Reply mark88 None 0 Points 15 Posts Re: Forms Authentication auto-redirect not working Jun 06, 2008 09:18 AM|mark88|LINK Everything with forms authentication works great except the auto-redirect. Asp.net Forms Authentication Returnurl My app requires a login to work for anything but the home page and login page, so when I fired up the application it died unceremoniously every time it tried to Forms Authentication Not Redirecting Similarly, theGetRedirectUrlmethod will return theDefaultUrlif no return URL is included in the request."

Then why wouldn't the sample C# code work?

Reply mark88 None 0 Points 15 Posts Re: Forms Authentication auto-redirect not working Jun 06, 2008 01:19 PM|mark88|LINK Will try the defaultUrl tonight but doubt it. http://sistemainmo.com/forms-authentication/forms-authentication-not-working-asp-net-4-0.php If I clicked on that control to take me to login.aspx, if I was on default.aspx which is able to viewed by all, default.aspx would refresh, I would not be taken The DefaultUrl property is used by the RedirectFromLoginPage method if no return URL is included in the request. In the error message it shows wrong attribute "defaultUrl" and says it is using framework 1.0 I am using Visual Studio.Net 2002 Title: thanks Name: madhav Date: 2005-12-31 4:20:15 AM Asp.net Loginurl

I actually ended up writing my own LoginStatus and added more jQuery stuff to it. –nolimit Aug 27 '11 at 6:01 "loginURL" should be the URL which users use I tried your suggestion but the issue still persists. The names specified in web.config match what is in the aspnet_applications table. his comment is here Privacy Statement| Terms of Use| Contact Us| Advertise With Us| CMS by Umbraco| Hosted on Microsoft Azure Feedback on ASP.NET| File Bugs| Support Lifecycle

Examples Forums Download Pricing Support FAQ

Browse other questions tagged asp.net forms-authentication or ask your own question. Asp.net Forms Authentication Example I'm not setting smartnavigation reference in config on desktop and redirecting works fine. Kiu estas la origino de la ĉapelitaj literoj?

current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.

Solution was: Open IIS Open IIS: Authentication Open and edit Anonymous access Check user (I changed the user to the app.pool user) Give user rights on the root of the site But I’m not using MVC and I’ve explicitly requested that I want to use a loginUrl of my own – namely login.aspx. It probably has something to do with some sort of Ajax-control on the page. -Frinny This post has been edited by Frinavale: 05 August 2010 - 08:36 AM Was This Post Bascially have an ASP.net website with Forms Authentication on IIS7 using Framework 4.0.

Sep 01, 2008 07:49 AM|rtpHarry|LINK Friends mark friends as answers [:)] Reply JacquesVDH None 0 Points 10 Posts Re: RedirectFromLoginPage does not work with defaultUrl. Gets sent to login page. Periodically, every couple of weeks or so, I would load the project on my laptop to develope when I was away. weblink A number of people have commented on this post, as well as a few private notes I’ve received via email and Twitter.

When I removed this assembly, everything worked. This codesnip will show you how to do so. Below is the code I used in login.aspx: protected void Page_Load(object sender, EventArgs e) { if (!(IsPostBack || IsAsync)) { string returnUrl = Request.QueryString["ReturnUrl"]; if (returnUrl != null) if (returnUrl == How can I check from the command-line if my integrated Wi-Fi adapter is disabled?