Reading cookie value : Using URL Rewrite Provider module – Unable to validate at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData

The good thing about this is that the error is a general decryption error and not one with URL Rewrite itself, so that gives you a wider area to search for help. The mechanics of URL Rewrite seem to be right. Decrypting means that it must be encrypted by the same method as you’re decrypting … Read more

Classic ASP: Multiple ASPSESSIONID in cookies

I was able to remove those cookies with Javascript. Just add next script to the end of login page. This will remove all “ASPSESSIONIDXXXXXXX” cookies before user will login to website: <script type=”text/javascript”> //Clear any session cookies (function(){ var cookiesArr = document.cookie.split(“; “); for (var i = 0; i < cookiesArr.length; i++) { var cItem … Read more

CakePHP remember me with Auth

In your user controller: public function beforeFilter() { $this->Auth->allow(array(‘login’, ‘register’)); parent::beforeFilter(); } public function login() { if ($this->request->is(‘post’)) { if ($this->Auth->login()) { // did they select the remember me checkbox? if ($this->request->data[‘User’][‘remember_me’] == 1) { // remove “remember me checkbox” unset($this->request->data[‘User’][‘remember_me’]); // hash the user’s password $this->request->data[‘User’][‘password’] = $this->Auth->password($this->request->data[‘User’][‘password’]); // write the cookie $this->Cookie->write(‘remember_me_cookie’, $this->request->data[‘User’], … Read more

how to disable cookies using webdriver for Chrome and FireFox JAVA

I’ve just get solution for Firefox: FirefoxProfile profile = new ProfilesIni().getProfile(“default”); profile.setPreference(“network.cookie.cookieBehavior”, 2); driver = new FirefoxDriver(profile); for Chrome (block all cookies) ChromeOptions options = new ChromeOptions(); options.AddUserProfilePreference(“profile.default_content_setting_values.cookies”, 2); for Chrome (block only third party cookies) ChromeOptions options = new ChromeOptions(); options.AddUserProfilePreference(“profile.default_content_setting_values.cookies”, 1); options.AddUserProfilePreference(“profile.cookie_controls_mode”, 1);

jquery ui tabs no longer supporting cookie? now what?

Had the same issue bite me today. Here is what seems to work: Use jquery.cookie plugin (https://github.com/carhartl/jquery-cookie) (This step is not necessary, but it makes the life easier dealing with cookies) Use the following code fragment: $( “.selector” ).tabs({ active : $.cookie(‘activetab’), activate : function( event, ui ){ $.cookie( ‘activetab’, ui.newTab.index(),{ expires : 10 }); … Read more

IE8 losing session cookies in popup windows

This is ‘new’ functionality in IE8! Checkj out the IE8 blog below to read about it. http://blogs.msdn.com/askie/archive/2009/03/09/opening-a-new-tab-may-launch-a-new-process-with-internet-explorer-8-0.aspx IE8 can use multiple processes for handling an x number of IE windows. When you cross a process space, you loose your cookies (Asp.Net session ID seems to be retained over this process boundry). I personally think it’s … Read more