forms-authentication

strange SQL Server attach database error

Hello everyone, I am using SQL Server 2008 Enterprise with VSTS 2008, and I am developing a simple web application using ASP.Net and Forms Authentication. When I am using the configuration tool/menu of VSTS of my ASP.Net project (I want to use this tool to manually add some Forms authentication users), I met with the following error (S...

MVC 2 Area Authentication Not Working

Using MVC 2, if I setup my root web.config with forms authentication (there is no locations section), and I go to a page outside an area (off of the root), I get redirected to the login page as one would expect. However, if I go to a page in an area, I don't get redirected as expected. Do I need an additional web.config somewhere in th...

ASP.Net Forms authentication provider issue

Hello everyone, I am using VSTS 2008 + .Net 3.5 + ASP.Net to develop a simple web application. And I am using Forms authentication for my web site (I use command aspnet_regsql.exe to create a new database in SQL Server 2008 Enterprise to host database for Forms Authentication. I am not using SQL Server Express.). I am learning Forms au...

ASP.NET MVC truly log off with Forms Authentication

I have a logoff action on a controller as so: public ActionResult Logoff() { var x = Request.IsAuthenticated; var y = User.Identity.IsAuthenticated; FormsAuthentication.SignOut(); Session.Abandon(); var a = Request.IsAuthenticated; var b = User.Identity.IsAuthenticated; ...

SharePoint 2010 and FBA

Hi, I an trying to setup Forms Based Authentication using ASPNetSQLMembershipProvider. In 2010 Beta 2, I was able to do this in classic mode, and it worked. With the RTM, it is no longer supported under classic mode, and I must switch to Claims based Authentication. So I created a new web application, and configured everything in sharepo...

Setting a Forms Authentication cookie from a .NET client application

We currently have a .NET 2.0 web app that uses forms authentication via cookies. Associated with this web app is an old VB6 client application that has its own login system. Currently, the users have to login to the VB6 app, and then when they click on a link, need to authenticate themselves again with the .NET forms authentication sys...

ASP.NET website requires login after each compile

Hi, I am working on two ASP.NET websites. Both use custom authentication process based on forms authentication with: <authentication mode="Forms"> <forms cookieless="UseCookies"/> </authentication> set in Web.config. When I compile the first website, it always remembers my credentials I've entered before, like expected. When I co...

SharePoint 2010 BCS passthrough authentication against web services

We are looking at creating a solution using SharePoint Foundation 2010 with forms-based authentication. The application will access business data by consuming a number of web services via SharePoint's business connectivity service. Both the web service and SharePoint will have access to the same database containing the user data for au...

silverlight security with WCF service, Forms Authentication and Custom Form Ticket

I have a silverlight application with login on the silverlight page. It uses Forms Authentication with WCF authentication service and customer Membership Provider. Something like : http://blogs.msdn.com/phaniraj/archive/2009/09/10/using-the-ado-net-data-services-silverlight-client-library-in-x-domain-and-out-of-browser-scenarios-ii-form...

ASP.NET MVC + Forms Authentication + AJAX: Polling action without resetting auth ticket expiration

Is there a way to mark a Controller Action to not reset the Forms Authentication ticket sliding expiration? I want to poll the server every x seconds for new info using ajax but that will effectively prevent the user session from ever expiring. ...

Forms authentication: disable redirect to the login page

I have an application that uses ASP.NET Forms Authentication. For the most part, it's working great, but I'm trying to add support for a simple API via an .ashx file. I want the ashx file to have optional authentication (i.e. if you don't supply an Authentication header, then it just works anonymously). But, depending on what you do, I w...

Why always fires OnFailure when return View() to Ajax Form ?

I'm trying to make a log-in log-off with Ajax supported. I made some logic in my controller to sign the user in and then return simple partial containing welcome message and log-Off ActionLink my Action method looks like this : public ActionResult LogOn(LogOnModel model, string returnUrl) { if (ModelState.IsValid) { if ...

Using forms auth, can I return a 404 from an inaccessible page, rather than redirecting to the login page?

Using forms authentication, is it possible to return a 404 if a user doesn't have access to content, rather than redirecting them somewhere? I realize I could send them to a 404-ish page, or redirect to a login page that doesn't exist, but I really want to return a 404 from the page they were attempting to access. Possible? ...

Client-side session timeout redirect in ASP.Net

I want to build a way to automatically redirect users to Timeout.aspx when their session expires due to inactivity. My application uses forms authentication and relies heavily on update panels within the same aspx page for user interaction, so I don't want to simply redirect after a page-level timer expires. For the same reason, I can'...

Authorization security of ASP.NET Forms authentication

I'm using Forms authentication in ASP.NET MVC website and I store user account login name in AuthCookie like this: FormsAuthentication.SetAuthCookie(account.Login, false); I want to ask if there is a possibility that user on client side will somehow manage to change his login name in AuthCookie and thus he will be for example imperson...

IsInRole Works only when user sign in

Hi Why HttpContext.Current.User.IsInRole("Customer") returns false if the user is not logged in, I think because user is considered anonymous is this case, Correct? Thanks ...

Setting auth cookie timeout length based on role in ASP.NET

I want to allow admins to be logged in for longer than normal users. I don't see a hook for setting the cookie timeout programmatically or in a role-based way. Is this possible in ASP using Forms Authentication? Thank you in advance. ...

People Picker can't find Forms Authentication Users in WSS 3.0

I used a lot of tutorials to turn my windows authenticated default wss web app to use Forms Authentication. What I've done since; 1. created a web app. and a site in wss 3.0. Made its anonymous access enabled for all site content. This wss app is in the "wss3" server. 2. created a membership db with regsql.exe in .net framework folder...

Use Apache authentication in Django without popup

I am using Apache to authenticate users for Django, but I would like to do so without the popup form that Apache uses in its basic configuration. How do I embed the login form within a page while still using Apache for authentication? That is, I'd like a page that says "Please login" and provides a form asking for username and passwo...

What is the content of ASP.NET FormsAuthentication cookie value?

What is the content of ASP.NET FormsAuthentication cookie value? How can I see the real value of the hashed string (in case that I have the decrypted key)? ...