RSS 2.0 | Atom 1.0 | CDF

Search

Categories

Archive

Blogroll

Sign In

# Tuesday, January 23, 2007
Tuesday, January 23, 2007 3:05:27 PM (GMT Standard Time, UTC+00:00) ( Asp.Net )
using Forms auth in an asp.net web site, with a standard Login control, i found a problem today where user 'Joe Bloggs' can log in with 'JOE BLOGGS' as his username.  this messes up my database a little because User.Identity.Name yields 'JOE BLOGGS' and i use this value in the application database. for consistency purposes i only want to use the case-correct version of the username, as it was created.

to fix this, i added the following code to my login
    protected void Login1_LoggedIn(object sender, EventArgs e)
    {
        // correct the case of the username
        foreach(MembershipUser u in Membership.GetAllUsers())
            if(u.UserName.ToLower() == this.Login1.UserName.ToLower())
            {
                // fix the username case
                FormsAuthentication.SetAuthCookie(u.UserName, true);
            }
    }

Comments [4] | | # 
# Monday, January 15, 2007
Monday, January 15, 2007 12:33:47 PM (GMT Standard Time, UTC+00:00) ( .Net General | Database )
if you're querying an MS access database from within access, you can use ? and # as wildcard single character/digit placeholders.
however, if you're querying via OleDb, then you have to use _
this took me ages to figure out. thanks to this useful entry in msdn2.

Comments [0] | | # 
# Friday, January 05, 2007
Friday, January 05, 2007 5:27:30 PM (GMT Standard Time, UTC+00:00) ( General )
all of a sudden my dvd drive stopped working, and i couldn't figure out why.  there was no drive listed in explorer and the device was not working, code 39.  i eventually found this ms kb article that gets you to delete 2 registry settings to fix the problem.  they said it could be caused by installing Easy CD Creator.  i tried to uninstall AsusDVD and that may have done it.  in any case, it works now.

Comments [1] | | #