forms-authentication

Is it possible to forward the current user's FormsAuthentication Identity to another Controller action?

Hi, I'd like to use ASP.NET MVC's views as mail template engine. For that, I am calling one controller action from another controller action using a System.ComponentModel.Component.WebClient, parse the returned web page and send it via e-mail. In this scenario, is it possible to forward the current user's login credentials (I am using...

Is there a way to configure IIS logs to retrieve the user details from forms authentication?

I am trying to analyse the IIS log and would like to look at the broken down by user. I can't do this at the moment because I am using Forms Authentication and IIS is logging everyone as anonymous, which obviously is expected. Is there a way to configure IIS to retrieve the user details from Forms Authentication? ...

After doing FormsAuthentication.SignOut(), user is not able to login again

I am using formAuthentication with the following Web.Config file. <authentication mode="Forms"> <forms name="SnowBall" timeout="30" slidingExpiration="true" loginUrl="Login.aspx" cookieless="AutoDetect"> </forms> </authentication> <authorization> <deny users="?"/> </authorization> I have a user control which has a Log...

CrosspagePostBack with Forms Authentication

I have PageA with some controls (txtFooBar) on it, and a button with PostBackUrl set to PageB. In PageB I can write Page.PreviousPage.FindControl("txtFooBar") and get at my values. Now suppose I am using forms authentication, and PageB is protected, and I'm not initially logged in, so when I press the button on PageA I go to the log...

How can I integrate updating lastactivitytime into the .NET FormsAuthentication process?

Hi, Basically, I'm trying to add support for tracking online users to a project I've inherited, which has a custom MembershipProvider and RoleProvider and uses FormsAuthentication. I've pretty figured out everything except the means by which I'm going to keep updating the lastactivitytime. The way I'd like to do this would be to just ha...

Persisting/caching data between requests - common approach

I'm developing an Asp.net (MVC but this doesn't really matter) application. I have a custom IHttpModule that's responsible for the PostAuthenticateRequest to change user principal & identity. I'm storing UserID and UserName in authentication cookie when user logs-in. I have an IUser (implemented by DAO and Business Objects layer, each w...

Why Response.Redirect("Pagename.aspx") doesn't work

Dear All, I have one application where after successful Login user will be redirected to Home.aspx. Now if I try Response.Redirect("Home.aspx") it doesnt work, But if I try FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, false);..its working. Now my question is why Response.Redirect() is not working? I know FormsAuthentication...

Silverlight and ASP.NET authorization

My website uses Forms authentication. I did silverlight 3 module which is designed to work in context of asp - authenticated user. Silverlight module talks with WCF hosted by the same asp.net website, but the issue is that it cannot authenticate to WCF service. I run Fiddler and I see that .ASPXAUTH cookie is not sent to WCF service. How...

Why does an authentication mode of "Forms" result in an empty LOGON_USER server variable?

Is it possible to: Disallow anonymous access in IIS AND Have... <authenticate mode="Forms"/> ...in the Web config? We need both access to the ASP.Net Membership provider and access to the Windows username in the LOGON_USER server variable. What we've found is that disallowing anonymous access in IIS will only populate LOGON_USER ...

Cannot access CSS file from ASP.NET login page

I have just noticed a problem accessing a CSS file using forms authentication from an ASP.NET application. Until I have logged in, then any styles I have set in my login page are not used, as IIS seems to be preventing the login page from accessing this file. Is there an easy solution for this? ...

ASP.NET: User won't stay logged in for more than 30 mins

This is really irritating me, and is probably causing the waning usership on my website. I'm using Forms Authentication to log my user in. I have the "Persist" parameter set to true by default when the user logs in: RedirectFromLoginPage(userString, True) and SetAuthCookie(userString, True) In my web.Config file I have the "time...

Integrating 2 different user dbs into a single ASP.NET MVC membersip provider?

I'm working on a project that needs to authenticate users based on records in two different databases. All administrators are stored locally and require full functionality to manage their accounts (reset password, etc). Regular users are authenticated against a different database used by another web app, so I only need to check that th...

asp.net FormsAuthentication.Authenticate() is not working

I have created a user by using CreateUserWizard - control. My web.config file is as follows: <?xml version="1.0"?> <configuration> <appSettings/> <connectionStrings> <remove name="LocalSqlServer"/> <add name="ConnString1" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=IceWebPortal_SQL2K5;user=sa;password=;in...

Avoid Authentication

Hi fellow stackers... I have an ASP.NET 3.5 app using forms authentication. I would like to request a page that is available to authenticated users only, but be able to display it to non authenticated users in certain scenarios. My question is at what point of the page lifecycle do I need to tell ASP.NET that is ok to display the page an...

Cannot login to WSS 3.0 site using forms authentication

A changed Windows authentication to Forms authentication. Using the following example. I added a user with Web Site Administration Tool. Finally I added this user as Site Collection Administrators and the user is recognized by SharePoint. Happy with that is started my WSS site in the browser but when I try to Sign in using this sign in ...

Double Logon for some users of an ASP.Net WebForms app

I have an asp .net webforms app that uses forms authentication. For a small number of users we have a problem where they log in, they navigate to a couple of pages and then they are asked to log in again. Once logged in for a second time they seem to be able to stay logged in as expected. They shouldn't be asked to login the second time....

Forms Authentcation over Sub Domain ASP.NET

This question is similar to this: Asp.net Profile Across Sub-Domain I'm basically wondering if a user logs in through "www.yourdomain.com", is it possible for "subdomain.yourdomain.com" to also recognize them as logged in by checking their AuthCookie? The referenced question's answer is to put: domain="yourdomain.com" within your web....

Custom .Net MembershipProvider in n-tier environment?

I am working on splitting out an existing, working application that I currently have in order to better understand n-tier structures. This app uses a custom membership & role providers w/ forms authentication. All Data access and business logic are all within the same ASP.Net solution currently. I have built a Business Logic Layer (...

Forms Authentication cross Windows Authentication

Hi guys I have a website that I am working on that has both an intranet and internet deployment. The only difference between the 2 is a couple of config settings. The internet version works fine as it just uses forms authentication (which is defined in its web config) and if not logged in the user is directed to a login page. The intr...

Different LoginUrl for different URL's with ASP.NET MVC and Forms Authentication

I have a ASP.NET MVC project, and I would like to have a different LoginUrl for different areas of the website. Depending on the area of the site, different types of credentials are entered. http://host.com/widget/home should redirect the user to http://host.com/widget/logon. http://host.com/admin/home should redirect the user to http...