Impossible love

Dedicated to the endless frustrations of trying to make these damn machines do what we want them to do...

Dedicated to the endless frustrations of trying to make these damn machines do what we want them to do...

Daniel Stolt's Blog

Let him who is without sin DirectCast the first Object.

How to Make Internet Explorer (And Others) Remember Username and Password

Categories: English | Windows   Tags: | | |

<UninterestingFluff>First of all, as if the following worn-down cliché had not been used enough times in the blogosphere already: I do apologize (mostly to myself) for not posting more in the months that have passed since I first created my blog. [Insert the usual excuse about being so busy with this and that and yada yada yada…] In all honesty, for every day I don’t get around to posting something, it feels more and more almost like I wasted all the time and effort that went into creating the design and setting everything up just the way I wanted it. Can’t have that. And I really do have a lot of stuff to post – in fact, I maintain an offline list of subjects I sooo badly want to blog about! I guess it’s been a classic case of a vicious circle – the longer I wait, the heavier the burden of getting caught up. Anyway, I’m going to make a serious attempt at breaking the circle now, so expect more frequent postings from here on out.</UninterestingFluff>

The Problem

Just to pick a random topic out of my great big pile, I decided to mark the beginning of this new and more active era with something that a lot of people around me always seem to struggle with: how to get Internet Explorer (and a number of other applications that also access HTTP servers using the WinInet API, such as Visual Studio Team Foundation Client) remember your credentials (username and password) for sites that require authentication, and reuse them on subsequent accesses.

Below is the dreaded password prompt as it looks in Internet Explorer 8 on Windows 7:

Windows Security dialog; Connecting to [URL]; Password; Remember my credentials; Use another account

As you’ve probably noticed, with the default settings, if the server you are accessing is not on the local LAN, you can check that “Remember my credentials” checkbox all you want – the password prompt is till going to pop up the next time you access the server in a new browser session.

So what’s going on? Well, in short, the default settings make sure that credentials are only saved and reused for URLs that are on the local LAN. This is for some sort of clever “security reasons” no doubt – because as we all know, it’s much more secure to force users to write down their passwords on sticky notes and attach them to their monitors, than to save those passwords is the heavily secured and encrypted protected storage of the user profile. Yeah. Seriously.

The Solution

Actually, there are two effective solutions to this problem, one of which I advocate more than the other:

  • The really easy (but in my opinion somewhat blunt and unnecessarily dangerous) approach is to make Windows save and reuse credentials for any URL within the Internet zone.
  • The slightly more demanding (but in my opinion considerably safer) approach is to add specific sites for which you want Windows to remember credentials to the Trusted Sites zone and make Windows save and reuse credentials for that zone only.

I’m going to show you how to accomplish the latter (if you really want to do the former I’m sure you can figure it out). Here’s how you do it:

  1. Go to Control Panel and open Internet Options.
     
  2. Go to the Security tab, select Trusted Sites and click Custom Level:

    Internet Properties; Trusted sites; Custom level;
     
  3. Scroll to the bottom of the options list and in the category User Authentication –> Logon, select Automatic logon with current user name and password:

    Security Settings - Trusted Sites Zone; User Authentication; Logon; Automatic logon with current user name and password;
     
  4. Click OK, and then click Sites.
     
  5. Uncheck the Require server verification (https:) for all sites in this zone checkbox, and then add the sites for which you want credentials to be saved and reused to the list of sites for this zone with both HTTP and HTTPS schemes:

    Trusted sites; Add this website to the zone; Websites; Require server verification (https:) for all sites in this zone;
     
  6. Click Close and then click OK.

That’s it. Hopefully, next time you access one of the configured URLs either by browsing to them via Internet Explorer or connecting to them by some other means through an application that uses WinInet for HTTP connectivity under the hood, the credentials prompt will not appear. Screen shots are from Internet Explorer 8 on Windows 7, but the steps should be identical all the way back to Internet Explorer 6 on Windows XP.

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Recent comments

Comment RSS