forms-authentication

Up to date tutorial of FormsAuthentication in Asp.Net MVC

I'm not getting to hang of the entire FormAuthentication thing. Is there an up-to-date tutorial somewhere? I found this one, but it a bit old and the syntax doesn't match recent Asp.Net MVC. ...

FormsAuthentication.RedirectFromLoginPage does not return me to orignal URL

I reach my login page with the parameter "returnUrl" set to the URL I was on. Then, I login via OpenID (DotNetOpenAuth), and call FormsAuthentication.RedirectFromLoginPage(). The login is successful, however I am not returned to the original page I was on. I'm having the same problem on logout - when I log out I don't remain on the same...

Can't log in a user in MVC!

I have been scratching my head on this for a while now but still can't get it. I'm trying to simply log in a user in an MVC2 application. I have tried everything that I know to try but still can't figure out what I'm doing wrong. Here are a few things that I have tried: FormsAuthentication.SetAuthCookie( emailAddress, rememberMe ); v...

C# Formsauthentication timeout in web.config overrules manual ticket timeout?

I have a testproject and the forms timeout specified in web.config overrules the timeout which I set in FormsAuthenticationTicket. According the documentation, the timeout (expire date) in FormsAuthenticationTicket must override the timeout in web.config. Documentation found on: http://support.microsoft.com/kb/910443 If the ticket is ge...

UrlRewriting.Net Module + IIS7 Equals Page.User == null?

I've used the UrlRewriting.Net module for a couple years now without any problems in Windows XP and Windows 2003. I just recently upgraded my home PC to Windows 7 and started developing a new website. The plan was to use .html extensions and rewrite them to their .aspx counterparts using the UrlRewriting.Net module. Everything works fla...

Does <authentication mode="Forms"> in web.config always generate automcomplete="off" in ASP.NET?

Hi, I have a website with in ASP.NET working fine. However, it becomes really annoy after a while that username/password needs to be re-entered every time even in our dev environment. The thing I noticed about our site is that FF/IE would not even prompt us to remember the username/password after login. In the code, there is no autoco...

forms login for guest and administrator problem

I have a web project GUI.. I was first working with administrator only. So when the administrator logs in with his username and password i use forms authentication to redirect him to the default page "Default.aspx". But now i have to work with Guests also... and on login check the role if it is of a guest then redirect him to a gues...

Why does FormsAuthentication.RedirectFromLoginPage() end with context.Response.Redirect(..., false)?

I browsed the source code of FormsAuthentication, and noticed it ends in context.Response.Redirect(strUrl, false); The 'false' parameter stands for "don't terminate execution of the current page". Why wouldn't a call to FormsAuthentication.RedirectFromLoginPage() need to terminate viewing the current page? What is the correct behavi...

SSRS Forms Auth Yields "Membership credential verification failed"

We're running SQL Server Reporting Services 2005 (SSRS) with a custom security extension to integrate with our ASP.NET's Forms Authentication, and are seeing a peculiar problem on one environment only. The SSRS portal itself works fine - can see list of reports and execute them ok. The problem is when running the reports from our custo...

Form authentication issue

I have two web applications. One is using windows authentication and the other is forms based. I need to add users to the later one from the first one? How do i achieve this? ...

CSS and Images broken in login page using a Masterpage, work when auth=windows

I have a login page that inherits a masterpage that has my navigation controls. I enabled forms authentication and when I run my code and the login page appears all the images and css values are not working. If I stop the application and go to design view everything is there like it should be, if I turn off forms auth and set it back to ...

Asp.net forms authentication and multiple domains

I have two domains, domain1.com and domain2.com pointing at the same asp.net website which uses asp.net build in form authentication. The problem is that even if the domains point to the same website the user only get authenticated for one domain at a time. So if he uses www.domain1.com first and then visits www.domain2.com it's the same...

Forms Authentication Cookie Expiration

I have an ASP.NET web application that uses Forms Authentication. In the web.config, the forms authentication timeout value is set to "20" (which I understand to be 20 minutes). We're seeing an issue where you'll be interacting with the site..(i.e. clicking on linkbuttons, performing postbacks, etc.) and randomly get sent back to the L...

FormsAuthentication authCookie is null only for some users

I am experiencing a strange problem with asp.net forms authentication. This problem only occurs for 3 users out of 30+ users that have successfully logged in. I am using very basic auth code that I have used many times and have never seen this problem. After the users successfully authenticates and the auth cookie is created, cookie a...

calling RedirectFromLoginPage but not redirecting to ReturnUrl

When a anonymous user tries to access a page that requires authentication, I redirect to the login controller/action: /user/login?ReturnUrl=/blah/do Upon logging in, I do: FormsAuthentication.RedirectFromLoginPage(user.Id.ToString(), false); The debugger shows that this line does get called. But then I get redirected to default.as...

IIS Windows Authentication before Anonymous

I have a website that I would like to allow both Forms and Windows Auth for. My problem is that it seems that when you setup IIS to allow both anonymous (Required for forms auth) and Windows auth that the browser won't send the user's network credentials. It just uses the anonymous login. Is there any way either in IE8 or IIS to have it...

Where in the Web Forms lifecycle can I re-authenticate a user?

Here's the situation - Most of this ASP.NET Web Forms application (which uses a single master page for all pages) with Forms Authentication, has a standard session timeout, but there are some "modes" where we store an encoded cookie that links the user to their account. I would like to manually check early on in the page lifecycle for t...

Shared Membership Provider

Hi, We have created a custom membership provider that we are using in one of our applications and now I would like to use the same provider for all our applications so that you only have to login once and stay logged in when you switch between applications. Just by using the same provider in web.config for different applications doesnt...

Using Forms Authentication without .Net providers

I want to protect a section of my website using forms authentication with the username and password as defined by me in the web.config. When I attempt to login I get the message below. Server Error in '/' Application. Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. I'm guessing this is happening because it's attempti...

Weird login problem on asp.net web application in IE

In my web application when i try to login in from Mozilla or chrome, it takes me to the correct url that im redirecting to after authentication, im using form-authentication. But when i try to do that in IE, it just puts my intended URL in the query string as return and gives me the login prompt again. Does any one have any ideas as t...