| Subcribe via RSS

Disabling Windows Authentication for XP Professional

March 19th, 2009 | Comments Off | Posted in Windows XP

I’ve got to say Microsoft has annoyed the hell out of me on this one. I’ve got 4 different licenses for XP Pro. Two are on computers I’ve decommissioned and will never be used again. So after a recent hard drive crash, I decided to stop making the best of this bad operating system (do I really need to tell you it was Vista), and put good ol’ stable XP Professional on this machine. Well wouldn’t you know it the computer wouldn’t accept my license key. I call into tech support and basically are told I’m SOL. My license won’t work in this fashion which is complete BS. I own the license, thus I should be able to put that software on any computer I wish as long as its not already in use. So after ripping some support rep a new one, I set out to figure out how to disable the authentication process.

There were sources online that were walking you through registry hacks and all sorts of questionable downloads. Then I came across an XP hack on eBay for a mere $8. What can it hurt right? So I go to install it and it doesn’t take. What it does do is direct me to the free resource online antiwpa (it can be found here: http://defcon5.biz/phpBB3/). They make it pretty painless. Just download a zip file and run the bat file. Reboot and no countdown to activation. Just so you are aware, AVG anti-virus does not play nicely with antiwpa. I’d recommend AVAST instead (also free) if you want to give this a spin. I’d also recommend you know a little something about computers. There are no guarantees with any of these things so you’ve been warned. If you’ve got questions, talk away on the defcon forum.

Tags: , , ,

Replace Ampersands but Not &amp

March 19th, 2009 | 1 Comment | Posted in Regular Expressions
We want to replace ampersands with the HTML entity ‘&’. The regexp to match is simple: &, i.e. match one ampersand. Unfortunately this will mess up our text if some of the ampersands have already been turned into HTML entities. So what we really want to say is replace an ampersand providing it is not followed by ‘amp;’. For this we need the negative lookahead assertion and our regexp becomes: &(?!amp;). The negative lookahead assertion is introduced with ‘(?!’ and finishes at the ‘)’. It means that the text it contains, ‘amp;’ in our example, must not follow the expression that preceeds it. –Courtesy of Linux.die.net Tags: ,

Replicating Google Ad Formating:Fonts, Color, Layout

March 18th, 2009 | Comments Off | Posted in Google Adsense, HTML

I was talking with a client and they were wanting to ramp up the dollars they were bringing in via Google AdSense. They directed me to a homeschooling website that was making good money off Adsense and Amazon ads. The site looked like HTML 101 / My first website and the client said if this plain jane website could monetize that well imagine what her site could do. The obvious thing that was escaping her was that this site had been around for 10+ years and was loaded with content. Can you imagine having the foresight to get on the web 10 years ago? The one thing I did notice was the vanilla website actually gave her a big advantage from the Google Adsense perspective. Strip out all the fancy CSS and styles, and the links to her articles looked very similar to the Adsense. The way she interspersed the blocks of ads, it was next to impossible to tell when you were clicking on an article and when you were hitting an ad. While I have no desire to turn back the clock to the web styling of the mid-90s, there is something to be said for this approach.

Today I thought I would look at replicating the format of the Google Adsense. How to go about finding the font size, color scheme, general layout. Once I have that, I can format certain sections of my site to generally match these blocks. So to get at the formatting, we need to do a right click over the Google Ad (not a left click, this isn’t a lesson in how to commit click fraud) and scroll down to This Frame >> View Page Source. This tells you that the Google Adsense block is basically being drawn into a frame. Once you get to the HTML, you get a glob of code that writes out the styles and the rendering of Google Adsense. Taking the basic leaderboard I’ve reassembled it to house two of my own links.

For added fun I included the Google Ads logo, I’d probably leave that out if I were you. Anyway here is the end result. Nothing flashy just a replication of the leaderboard format. This can be done with any of the various ad blocks offered.

Find Sold Out Theatre Tickets
To the Hottest Shows in San Francisco
  
Find when Taylor will be in your town
Tour dates, tickets and information

Tags: , , ,

Inserting XML into ASP.NET DataList

March 3rd, 2009 | Comments Off | Posted in ASP.NET, C#, XML
No heavy lifting today just back to basics working with ASP.NET’s DataList control. So I’ve worked to convert the album listings of a popular music download site into an XML format so I can display them on my sites. Going the route of a DataGrid or Gridview would be too constraining for my needs since I want to display pictures and have two columns per row. I want to customize the layout in other words and that isn’t DataGrid’s strong suit. Enter the DataList. With the DataList, I can customize the data flow in the Item Template as well as set how many columns to repeat and in which direction. All this in very little code. First we need to declare the System.Data object so we can put our XML document into a DataSet. Once there we’ll bind it to the DataList which is defined here as dlAlbums. Now looking at our DataList, we set the properties for RepeatDirection as well as RepeatColumns to define how our cells are going to write to the table. From there, we pull in our values from the XML document, filling in our appropriate placeholders. It doesn’t get much easier than that. Tags: , ,

IIS Error – XML Parsing Error: not well-formed

March 2nd, 2009 | Comments Off | Posted in ASP.NET, IIS

This message triggered when trying to pull up a standard ASP.NET page on IIS that I know was working on another computer. This was a basic ASP.NET page, not an XML document. It appeared the extension mappings were off. So I pull up the command prompt, and navigate to the aspnet_iis.exe file (on my machine this was located at c:\Windows\Microsoft.NET\Framework\v2.0.507277). From there I run the following command:

aspnet_iis -i

This is the handy app that registers ASP.NET with IIS. It updates the script mapping of an application with its specific ISAPI extension.

Tags: , ,