forms-authentication

Shared Forms Auth cookie not working on subdomain

夙愿已清 提交于 2019-12-08 03:27:28
I have a domain www.foo.com and sub domain www.bar.foo.com . A user logs in at www.foo.com and is redirected to www.bar.foo.com . The site at the sub domain is a different website, and even though the cookie is being passed across correctly in the subsequent requests to both the primary and sub domain, the authentication on the sub domain isn't working. Both sites share the same machine key information and the web config for the two sites are configured as: www.foo.com: <authentication mode="Forms"> <forms timeout="120" protection="All" slidingExpiration="true" name=".authcookie" domain=".foo

FormsAuthentication.CookieDomain property

ぐ巨炮叔叔 提交于 2019-12-08 03:17:16
问题 Q1 FormsAuthentication.CookieDomain property specifies the domain for which this cookie is valid. Overriding this property is useful if you want to enable the cookie to be used for more applications on your web server A) I assume the quote is suggesting that if same browser is used to log onto two web applications, then overriding this property will cause these two applications to put their tickets into same authentication cookie? B) Doesn’t above quote imply that if we only have one Asp.Net

In ASP.NET; How can I login from a remote HTML page into another ASPX page with ASP.NET Membership

限于喜欢 提交于 2019-12-08 02:11:38
问题 I basically need to login into another domain that is using asp.net membership. If we have an ASP.net web application using ASP.Net Membership on one hand, and an HTML page from another domain on the other hand. Is it possible to login into the ASP.NET website via remote HTML page. I've done this with Coldfusion before but ASP.NET membership is using a server control. Cheers! 回答1: Underneath the Login Server Control, ASP.NET uses a MembershipProvider implementation and Forms Authentication to

How to keep a parameter from url after redirect to login.aspx

断了今生、忘了曾经 提交于 2019-12-07 21:18:52
问题 I have the following route: {language}/{controller}.mvc/{action}/{id} Once a user has choosen the language it is then maintained in the route-value language. http://localhost:4000/de/Account.mvc/Register I have a problem if a user hits a page that needs auhtorization. He ist then redirected to http://localhost:4000/Account.mvc/Login?ReturnUrl=%2fde%2fAccount.mvc%2fProfileData The login page is configured in web.config and does not allow for a parameter from the route. The page after login is

FormsAuthentication: UserData lost (but in Cookie)

瘦欲@ 提交于 2019-12-07 21:07:57
问题 Asp.Net MVC 3 FormsAuthentication (custom) iPad MobileSafari iframe (same domain) After struggling with formsTicket.UserData not working with MobileSafari (ONLY MoblieSafari), I found out, that httpContext.User.Identity.Ticket.UserData is empty (in MobileSafari, not the others) and the original FormsAuthentication HttpCookie contains the right values ?!? How can that be?! Code: public void UpdateContext() { if (httpContext.User.Identity is FormsIdentity) { // Get Forms Identity From Current

Forms Authentication not working for specific page

喜你入骨 提交于 2019-12-07 16:40:51
问题 I cannot seem to isolate my forums to set different permissions for them than the rest of the site. Here is the setup for my site. <location path="."> <system.web> <authentication mode="None" /> </system.web> </location> I need to isolate my forums. At the moment, for testing purposes, I have it setup so that all users are denied access. <location path="~/public/public-forum.aspx"> <system.web> <authentication mode="Forms"> <forms loginUrl="public/login.aspx" /> </authentication>

Forms Authentication Using Active Directory / LDAP

ⅰ亾dé卋堺 提交于 2019-12-07 15:24:18
问题 First off--thanks for having a look. MY QUESTION In a .NET web app, is using Windows Authentication for a extra-net on a WAN consisting of various users, companies, user-agents, etc a bad idea? BACKGROUND I am lead dev on a fast track (very fast) web application for an extra-net that will allow the client's vendors, suppliers, partners, etc to log on and push and pull certain assets such as image files, videos, flash files, etc. PLATFORM/TECHNOLOGY Asp.Net 4.0, C#, MVC3 PROBLEM (Maybe) The

Can't set FormsAuthenicationTicket.UserData in cookieless mode

橙三吉。 提交于 2019-12-07 14:45:54
问题 I'm trying to implement the "Writing Information to UserData" section of this article, but it doesn't work properly when the cookie is part of the URI. My code: // Create the cookie that contains the forms authentication ticket HttpCookie authCookie = FormsAuthentication.GetAuthCookie( userName, createPersistantCookie ); // Get the FormsAuthenticationTicket out of the encrypted cookie FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt( authCookie.Value ); // Create a new

Client-side session timeout redirect in ASP.Net

ぐ巨炮叔叔 提交于 2019-12-07 12:54:55
问题 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't use '<meta http-equiv="refresh"/>' What I want to do is create a simple ajax web service with a method called IsSessionTimedOut(), that simply returns a

How do I use ASP.NET Login Controls when my Login.aspx is not at the root of my application?

ぐ巨炮叔叔 提交于 2019-12-07 12:46:29
问题 I'm using the ASP.NET Login Controls and Forms Authentication for membership/credentials for an ASP.NET web application. It keeps redirecting to a Login.aspx page at the root of my application that does not exist. My login page is within a folder. 回答1: Use the LoginUrl property for the forms item? <authentication mode="Forms"> <forms defaultUrl="~/Default.aspx" loginUrl="~/login.aspx" timeout="1440" ></forms> </authentication> 回答2: I found the answer at CoderSource.net. I had to put the