forms-authentication

Form Cookie Expiring too soon on production server

时间秒杀一切 提交于 2020-01-24 21:06:17
问题 i have following settings in web.config <authentication mode="Forms"> <forms loginUrl="~/Account/login" slidingExpiration="true" timeout="2880" protection="All" /> </authentication> but the cookie expires in less than five minutes of inactivity. Any clue on what is happening? 回答1: I recognize this behavior from a web host where I run one of my sites. It all started when moving to new servers, prepared for dotNET 4. The web.config is completely ignored and, as you mention, five minutes seems

SEVERE: jdbcrealm.invaliduserreason WEB9102: Web Login Failed

為{幸葍}努か 提交于 2020-01-24 20:22:25
问题 I'm trying to get my login form to with a MySQL Database and keep on getting the following error: [update] --> I made some modification today this is what I'm getting right now: SEVERE: jdbcrealm.invaliduserreason WARNING: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception WARNING: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception WARNING: WEB9102: Web

Access is Denied - 401.2: Unauthorized Error

泄露秘密 提交于 2020-01-24 12:17:20
问题 I have an ASP.NET website hosted on IIS 7.5 as below: I have "customwebsite.com" as the website and in it I have two Web Applications - uk & us - so that I can access these application as customwebsite.com/uk & customwebsite.com/us. customwebsite.com directory does not have any web.config and have only two folders for web application us and uk. Both us and uk web application have their individual web.config and have Form Authentication specified as below: <authentication mode="Forms"> <forms

Server cannot modify cookies after HTTP headers have been sent, how Fix?

旧时模样 提交于 2020-01-24 02:24:47
问题 i want to auto login my users at page_load of masterpage if UserName and Password exist in cookies! so i wrote the code below : protected void Page_Load(object sender, EventArgs e) { LoadDataFromCookieIfExistAndLogin(); } private void LoadDataFromCookieIfExistAndLogin() { string Query = Request.Url.Query.ToString(); string[] Ar_Query = new string[2]; string[] splitter = { "%2f" }; Ar_Query = Query.Split(splitter, System.StringSplitOptions.None); string[] Ar_new_Query = new string[2]; int

Server cannot modify cookies after HTTP headers have been sent, how Fix?

浪子不回头ぞ 提交于 2020-01-24 02:24:14
问题 i want to auto login my users at page_load of masterpage if UserName and Password exist in cookies! so i wrote the code below : protected void Page_Load(object sender, EventArgs e) { LoadDataFromCookieIfExistAndLogin(); } private void LoadDataFromCookieIfExistAndLogin() { string Query = Request.Url.Query.ToString(); string[] Ar_Query = new string[2]; string[] splitter = { "%2f" }; Ar_Query = Query.Split(splitter, System.StringSplitOptions.None); string[] Ar_new_Query = new string[2]; int

User.Identity.IsAuthenticated vs WebSecurity.IsAuthenticated

做~自己de王妃 提交于 2020-01-23 05:32:27
问题 In an MVC4 app, in a controller logic I want to check if the user is logged in. Should I use: User.Identity.IsAuthenticated Or: WebSecurity.IsAuthenticated As far as I know WebSecurity is just a wrapper. Should I use it or User.Identity has different functionality ? 回答1: As far as I know WebSecurity is just a wrapper. That's correct, both are the same. Let's have a look at how the WebSecurity.IsAuthenticated property is implemented: public static bool IsAuthenticated { get { return Request

ASP.NET authentication cookies not stored when using jQueryMobile on iPad

房东的猫 提交于 2020-01-23 02:38:07
问题 I have an ASP.NET MVC2 app using jQueryMobile. It is a secure app, and i'm using the ASP.NET authentication within the MVC2 framework. I am using standard authentication via the web.config: <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="2880" /> </authentication> I am securing certain controllers using the Authorize attribute: [Authorize] public class ClientController : Controller All my web pages as based upon the same master page, which has a top-level container

How to login in web site using Java

北城余情 提交于 2020-01-20 02:26:33
问题 I want to access some pages of web site https://myoffice.bt.com which requires user authentication using java. We have to sign in first to access pages. I have wriiten following code. package root; import java.io.IOException; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.params

How to login in web site using Java

做~自己de王妃 提交于 2020-01-20 02:26:14
问题 I want to access some pages of web site https://myoffice.bt.com which requires user authentication using java. We have to sign in first to access pages. I have wriiten following code. package root; import java.io.IOException; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.params

Increase the time of asp.net forms Authentication Even I change Time in web.config file its not working

。_饼干妹妹 提交于 2020-01-17 12:38:41
问题 Below is My Web.config File Code I am using forms Authentication. I increased the Time out Time but still its not working with in 2 minutes My Application is Getting log out Automatically Again User had to sign in Again . <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile