forms-authentication

One set of code, two authentication schemes Forms Auth + Windows Auth: The lesser of evils

We have an application that is currently required to be accessed using two authentication schemes, Forms Auth and Active Directory or NTLM / Windows Auth. The way the application is now, there are two IIS sites pointing to different folders with the same set of files, everything identical except the web.config. Before anyone flames me ...

Logout Issues with WPF and Client Application Services

I have recently been prototyping an application using WPF and Client Application Services. I am trying to use all three features of the Client Application Services : Forms Authenticiation, Role Security, and Client Profile. I have managed to get everything working, but I feel like my solution is a kludge and want a better way. For the...

ASP.NET doing a double post form, once to page other to url

Hey i am using a 3rd Party Newsletter Tool which at the end gives me the html for the form to place on my site. Basically looks like this <form action="http://link/subscriber/subscribe.html" method="post"> <input name="subscribeBoxId" type="hidden" value="XXXX"/> <input name="subscribeBoxTitle" type="hidden" value="Subscribe Bo...

Configuring an additonal sub login area with ASP.NET membership?

Hi, I have a main login for my client facing website configured with ASP.NET membership. I also have a secondary login for my admin backoffice called /admin with a login page /admin/login.aspx upon logging in it should direct to: /admin/secure/ I've placed a web.config file in /admin/secure/ as follows <?xml version="1.0"?> <config...

why after validation is false HttpContext.Current.Request.IsAuthenticated

I've created a login on my website using forms authentication, I do not understand why after creating the ticket and adding it to the cookies if I check for HttpContext.Current.Request.IsAuthenticated i get false. Only on the successive request the user become authenticated this is my code var fat = new FormsAuthenticationTicket( ...

Different authentication forms for different folders

I have an ASP.NET website with two different sections, root website and an /Admin sub-folder. I want to have two different forms authentication/login pages for them. /Admin folder should use/redirect /Admin/Login.aspx and root pages should use /Login.aspx. What should I do in web.config to accomplish this? ...

Custom authentication from third party in ASP.net/MVC

I'm trying to wrap up a custom authentication system for internal use for a project I'm working on in MVC. We currently have a partner that hosts an external site with forms authentication. Certain sections of this site redirect to a section on our internal site. Passed along with this redirection is an id and a session id. They pr...

Trouble with metadata in Entity Framework connection string

I have a Silverlight 4 app using RIA Services in which I moved all of the RIA Services-specific code to a separate module (a WCF RIA Services class library) called "AppServices". Let's call the main app "Silverlight4App". I need to authenticate the users against a different database than the database where the rest of the data is stored....

Execute ASP.NET Membership Login from codebehind in button click handler

I'm trying to seamlessly log in the user without prompting for credentials as part of a <asp:Wizard> process. My strategy is to handle the NextButtonClick event and login the user in code. I already have the user's credentials saved in session variables. Is it possible to login a user in code? Will a hidden <asp:Login> control behind th...

Cross app on subdomain form authentication not working

Hello, We've been investigating this issue for a week now. We have two applications deployed in two servers. domain.com.cz/app1 sub.domain.com.cz/app2 They do have the same validationKey, decryptionKey, and validation properties in machineKey section. They also have the same domain in forms authentication, also enableCrossAppRedirects...

Sharing authentication between two web applications

I have a base web site (Asp.net WebForms application) running under ie. http://localhost:90/ Then I created a new (this time Asp.net MVC) application and added it under http://localhost:90/mvc/ but not just as a simple virtual folder, but as an application folder by defining a different application pool to run it, compared to the p...

Securing the Forms Authentication Cookie when offloading SSL

Hi, I am attempting to secure a website I am currently developing using ASP.NET MVC 2.0 and forms authentication. In order to secure the forms authentication cookie I want to set the requiresSSL property to true so the cookie is only send by browsers when the connection is under SSL, and obviously ensure that all resources which require...

Page.User.Identity.IsAuthenticated still true after FormsAuthentication.SignOut()

I have a page that when you press 'log out' it will redirect to the login.aspx page which as an page_load method which calls FormsAuthentication.SignOut(). The master page displays the log out link in the top right of the screen and it displays it on the condition that Page.User.Identity.IsAuthenticated is true. After stepping through ...

ASP.NET authentication - multi-app and multi-user database

We have a simple ASP.NET app that uses the ASP.NET SqlMembershipProvider and all is great. We want to create a second app on the same server, also use the SqlMembershipProvider, but a different "applicationName" so that the user accounts between the two apps are kept separate. It looks like this would be possible by making the two di...

How does forms auth work with ASP.Net MVC2

I am having a hard time to get Forms Auth integrated in my MVC2 site. I googled and searched and tried different things, read msdn docs, but nowhere a decent tutorial on how to do it the MVC way. I have an application, and I set up users and roles with the wizard. And I made a controller with a logon action with a LoginControl. Now what...

ASP.Net MVC 2 authentication (login) best practices

Hi guys, I am developing an ASP.Net MVC 2 application as a composite application in SalesForce.com. For those not familiar with SalesForce.com it is a CRM platform on the internet. What the composite application is it simply is shown inside an iframe in a separate tab. So when the user logs in to salesforce.com that user sees a bunch of ...