cookies

Cookies in wcf service OperationContract

Is it possible to read cookies in the OperationContract of a wcf service? I am trying to read a cookie value in the contract method, but its always empty. If I read the same cookie from a .aspx page, the value is present. Any ideas? ...

Why is my cookie not being set?

I'm writing a django login view, that re-uses the generic one to do most of its heavy lifting, but I handle some details afterwards: COMPANY_COOKIE = 'last_login_company_id' def login(request, *args, **kwargs): initial_company_id = request.COOKIES[COMPANY_COOKIE] if COMPANY_COOKIE in request.COOKIES else None def makeCompanyAut...

C# Cookies based on login information...

I have 2 login controls on a web application one on default and one on default2 (the naming convention will be updated after I get it working). What I am doing is setting a cookie on each login that will send a connectionstring name from the login controls authenticate method. It is sending a string that is hard coded to a base class c...

Is this login system secure enough?

After looking into our login system to add some new features, I found out that it isn't very secure. The auth cookie was the encryption of user id, stamp, version, PASSWORD IN THE RAW, and a cookie id At least I can say I am not the one who did it like that, a previous developer did. (Yes, I know that password should be saved as a hash i...

C# Cookie Login

Hi guys, I'm trying to buffen up my C# knowledge and experience so I am converting a Python script I wrote to C#. The script converts and stores the user's browser cookies into a text file. It then uses them to log into a website that uses WLID stores the new live.com cookies and the websites own user cookies; then scrapping the source ...

Trouble with jQuery UI Tabs & Cookie Option

I am using the jQuery UI tabs interface and I want to set a cookie (using the jquery.cookie.js script they recommend, from stilbuero.de/jquery/cookie/) to remember which tab was last selected when the page is refreshed. That much was easy, going by the instructions at jqueryui.com. In context, these tabs are going to display search resu...

ASP.NET cookie name in cookie value

I'm having trouble figuring out this issue I'm having with cookies and asp.net applications. A webservice is used to get user info with the following method call: GetUser(token) The token parameter comes from a cookie named "token". A user visits the website, and a token cookie is created. The website needs to interract with a third...

duplicate cookies set by Google Analytics JS tracker

On the site www.biowishtechnologies.com/au/ we are experiencing an issue where Google Analytics is duplicating its cookies on each request. Why? ...

Is CSRF possible without Cookies?

I have been investigating this for some time, but I haven't found anything to satisfy my curiosity. Is it possible, as a user, to be the victim of a CSRF attack if cookies are disabled. Obviously CSRF depends on the users browser to send the user's credentials with the forged request to the legitimate server. Besides IP addresses, bro...

Setcookie won't work?

I set the cookies regularly in a callback page in my Twitter application. Everything works fine. Now, using jQuery, I submit a form, and the callback function activates a PHP script. That script only needs to set one cookie to the serialized values of $_POST; and the values run fine (both serialized and normal, I echoed them out to debu...

How to delete only cookies set for .domain.com ?

Is there any way to tell if a cookie is set for .domain.com rather than www.domain.com? A solution in either client-side JS or server-side PHP would be OK. What I would like to do is delete any cookies set for .domain.com, because I have recently set up static.domain.com for static content, and I don't want cookies being sent to the sta...

Is it ok to keep on updating Date Time using Javascript's setInterval method?

I am using Javascript's setInterval method to keep on updating the time of the Client computer. This is my code: $(document).ready(function() { setInterval(function() { setCookieForDate(); }, 500); }); function setCookieForDate() { var cookie_date = new Date(); var serverDateTime = '<%=DateTime.Now%>'; document.cookie =...

set cookie to expire at end of session? asp.net

I'm surprised i couldnt find any answers. How do i set my sessionid in my cookie to expire at the end of session? (when the browser closes or the user has been inactive for a period of tie). The two solutions i found were (httpcookie).Expires = HttpContext.Current.Session.Timeout Which gave me a compile error so i dont know if the ...

PHP session without cookies

Is there a way that I can initiate a persistent session in PHP without the placement of a session cookie? Are there other ways of maintaining a session across pages, such as an IP address-based solution? My reason for asking is, is that although most users have cookies on, I want to see if there's a way for a login system to work for th...

Sharing django sessions on specific subdomains

I have example.com and support.example.com . If a user is logged in on the main site, I'd like to have the session be accessible from the support site. Setting the SESSION_COOKIE_DOMAIN to '.example.com' isn't what I want because I have many, many other subdomains with django apps that I would like to NOT have access to the session. C...

Struts <bean:cookie> tag breaks on WebLogic 11gR1

I'm trying to deploy a very simple Struts app on WebLogic 11gR1. The app has one JSP called Welcome.jsp and this JSP contains the following tag : <bean:cookie name="" id=""/> The associated taglib is imported at the top of the JSP using the following line : <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> When t...

Java: WHEN to detect whether cookies enabled

This might be more of a user-experience question than a business logic question, but I'll ask it anyway...because I value your opinion! I'm working in a simple eCommerce site and for security reasons, I want to rely exclusively on cookies for session management. In your opinion, is it more advantageous to detect whether the client's b...

Cookies for different browser

I am using asp.net with c#. My issue is this that I am setting cookies to check that the same user is returning or not but user are returing from the same machine with different browser. Is their any alternate I would know that same machine user had visited my site. ...

How to store dyanamic value into jquery cookie variable

How can we store dynamic variables into cookie . var username = ($("#username").val()); how to store the variable username into jquery cookie variable $.cookie('username', '+username +'); alert($.cookie('username')); ...

How to store user preferences in a web app?

hey everyone i would like to know a good software engineering way to store user preferences in a web app. to clarify further, my app has commands that the user can choose, so i added a button that when some commands are selected, these commands are saved as favorites somewhere on the client's machine, that way if user X logs in at anytim...