I'm looking for some guidance with respect to cookies in ASP.Net MVC (or just cookie handling in general). I have been storing authentication information about users who authenticate via a form login in a cookie. This is working great, but I now need to store a little more information in the cookie. This additional information is not rea...
Using Asp.Net MVC 1, I have my "log on" control/page...I check the "remember me" checkbox and hit submit.. in my controller I have:
FormsAuth.SignIn(userName, password, rememberMe)
This method creates the persisted cookie .ASPXAUTH and everything is good at this point.. I put a breakpoint in other controller, and I noticed that once I...
Hi,
i have a problem with the safari browser and our set-cookie.
Safari is ignoring our set-cookies completely while FF and IE accept and send the cookies.
The Cookie setting page is not a redirection, direct HTTP 200 with set-cookie.
Is there a special character or malformed set-cookie that causes Safari to ignore the cookies complete...
Hi,
I'm planning to setup a website that would access an oauth wrap framework. I was thinking of storing the access token on the client machine as it is. I do NOT want to maintain a database of temporary tokens, etc on the server.
Should I be doing do? Or should I encrypt it?
...
When I visit usatoday.com with IE, there're cookie files automatically created in my Temporary Internet Files folder. But why doesn't the following Perl script capture anything?
use WWW::Mechanize;
use strict;
use warnings;
my $browser = WWW::Mechanize->new();
my $response = $browser->get( 'http://www.usatoday.com' );
my $cookie_jar = ...
I've got the following (shortened) struts2 action:
public class MyAction extends BaseAction implements CookiesAware {
public String execute() {
if (cookiesMap.containsKey("BLAH"))
blah=Integer.parseInt(cookiesMap.get("BLAH"));
return "success";
}
// For handling cookies
Map<String, String> cookiesMap;
@Over...
I have a fairly simple web app that uses cookies to store some information about the user and to authorize them on each request. When the user first logs into the site a cookie is created and some encrypted information is stored in there, the expiration is set for the current time plus 24 hrs.
What I want to achieve is that whilst a user...
Hi
I want visitors to my website to fill out a contact form before they can access the downloads page. I am looking for online resources or examples. The only ones I can find are username and password authentication which I don't need. I am hoping to do it in PHP. At the moment my Contact form emails me their details but anyone can acce...
I get an error saying The status code return from the server was: 500, when I try to set a cookies value from a call inside an update panel. I have seen that there are issues with this, but it works fine on my development machine but not on the test server.
...
I have implemented remember me option in my asp.net webform by using this,
protected void LBtnSubmit_Click(object sender, EventArgs e)
{
if (this.ChkRememberme != null && this.ChkRememberme.Checked == true)
{
HttpCookie cookie = new HttpCookie(TxtUserName.Text, TxtPassword.Text);
cookie.Expires.AddYears(1);
Response....
I'm working on a web application that is using Forms authentication.
<authentication mode="Forms">
<forms slidingExpiration="true"
loginUrl="~/User.aspx/LogOn"
timeout="15"
name="authToken" />
</authentication>
I'm seeing this cookie set in my browser when I log in:
The question is what h...
I'm using a web service backend to provide authentication to Django, and the get_user method must retain a cookie provided by the web service in order to associate with a session. Right now, I make my remote calls just by calling urllib2.urlopen(myTargetService) but this doesn't pass the cookie for the current session along.
I have crea...
I have an ASP.NET web application that stores a HTTP cookie when a certain action has been performed (e.g. a link has been clicked). Now, I am creating a standalone C# app which needs to watch the cookies folder and recognise when a cookie entry has been created by my web application and read the contents of the cookie.
Could anyone ple...
Hi,
I know this has been asked before but I needed some clarification and confirmation.
I've been told when creating cookies, to use httponly to prevent XSS.
So my clarification is if I use httponly, will my php scripts accessed via ajax request still be able to determine my active php session (default: phpssessid) and retrieve my $_SE...
Here is my code:
$(function() {
var section = new Array('#content');
section = section.join(',');
var fontcookieoptions = { expires: 10 };
var originalFontSize = $(section).css('font-size');
// call cookie class
$.cookie("test");
// parse cookie into numerical data
var savedFontSize = parseFloat($.cooki...
Hi,
There is a multilingual web shop, visitors can access from two domains, with different language:
hxxp://x.com - English
hxxp://x.ru - Russian, which is an add-on domain to x.com.
The authentication and cart pages are here, through SSL:
https://x.com/index.php?mode=login
How can I use the cookie informations of x.ru on hxxps://x.co...
So the other day I posted about a problem I had trying to use the sessionProvider found in the examples of ExtJS but it was in a fairly complex page so I figured I woud trim things down and use the basic array-grid sample that uses the default CookieProvider to demonstrate the state saving in a cookie and modify it to use the SessionProv...
Say there is a site foo.com which loads JavaScript from site bar.com. Now, say the JavaScript from site bar.com tries to read cookies using document.cookies. I was under the impression that using JavaScript, you can read all the cookies set in the browser irrespective of their source. But it turns out that the JavaScript from the site ba...
Hello I need to destroy javascript cookies on a page refresh. I need to set a new bunch of cookies on every page load which help me render the web page based on user options. Is there a method to destroy cookies on a page refresh??
...
I'm just trying to set and use a cookie but I can't seem to store anything.
On login, I use:
setcookie("username", $user);
But, when I use Firefox and the Web Developer plugin Cookies -> View Cookie Information There is no username cookie.
Also, when I try to access the value from a subsequent page using
$_COOKIE["username"]
It is...