Customising the CreateUserWizard control

I wanted to add some code to my CreateUserWizard to enable the user to be assigned a role at the same time they were created but I ran into a snag. I added a radioButtonList with all the roles in to the createUserWizards template and then when I tried to add the user to the role in the CreatedUser sub I kept getting null exceptions :(

After a lenghty Google around I eventually discovered that it was because I was trying to find the radioButtonList in the CreateUserWizard when in fact I should have been looking for it in the createUserWizards ContentTemplateContainer.

This doesn't work:
Dim rblRole As RadioButtonList = CreateUserWizard1.FindControl("rblRole")
This works:
Dim rblRole As RadioButtonList = CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("rblRole") This is one of the "not very obvious" things that I waste hours of time on, so maybe I've saved you some.

SQL Server 2005 database diagrams

I came across this error today:

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

Nice and simple to fix this one, change the database compatibility level to 2005.

EDIT: see also

New Blog stopped talking to my web server and I was unable to publish any posts, not that there have been loads, so I decided to look around for another blogging app, preferably a VB one.
I had no luck in finding one :(
.Text (on its own) seems out of date and when rolled in to Community Server has too much, well, Community Server with it. dasBlog looks like poo (sorry, but it does) and that seems to be about it as far as goes.

Then I found WordPress, it's pretty, it was easy to set up and I was even able to import my posts, well done and thanks guys.

IIS Borked? Thankfully, no :-)

A non fatal configuration error occurred. Not all information may be displayed.

I have encountered this error with IIS twice, the first time I just gave up deleted the metabase and recreated all the sites, the second time however I managed to find a solution (I had to find a solution as it wasn't my server ;) ) It was caused buy a site that was deleted and got 'stuck' I was able to easily see and delete this using metaedit MetaEdit showing a broken site

AWStats fun and games

I decided that it would be nice to make use of one of the geoip plugins for awstats what I didn't bargain for was wasting over an hour because nobody bothered to say any more on the matter than "you need the geoip plugin". You have several choices, MaxMind have bunch you can use or there are various you can get through CPAN or ppm, I tried geo-ipfree which I got through ppm (I like ppm, with just install geo-ipfree I had it) but the results were crap 70% or more shown as "unknown ?" :(
Eventually after a spot of RTFM and STFW I came across a post on sourceforge which shed light on it.

  1. Take geo-ip-pureperl from maxmind
  2. Take geoip.db from maxmind
  3. unzip/tar them both
  4. From the pureperl package take /geo/ip/ from /lib/ and stick it in your awstats plugin dir
  5. Edit /awstats_plugindir/geo/ip/ and change the path to geoip.db to wherever you stuck it
  6. uncomment the appropriate line in awstats.yourdomain.conf


ASPHut Guestbook

Jason and I have just launched a new site which is the repository for our programming output, at the moment it just has a mighty fine guestbook but will, soon enough, have heaps of great software, some free some not. Check out the guest book here

Using Internet Explorer with Filezilla FTP Server

I recently explained to a customer that he could use IE or Firefox to upload/download files from our ftp server, and in the true tradition of such things I found out that this doesn't work because of my setup, a simple fix is either to open a million ports for Active FTP or get the users to force IE to be Passive. Editing the following registry key should do the trick.

"Use PASV"="yes"

MAPI32.dll Problems

mapi32.dll is an invalid Extended MAPI Library
Mail is not installed on your system

The above two messages are produced when I run mail merge in word 2003 on a Win2k3 Terminal Server with Exchange installed and I am selecting recipients from an existing list.

Also I get "Unable to obtain list of tables from the data source." if I choose Outlook address book as the recipient list.

This appears to be because the Exchange 2003 version of mapi32.dll located in c:\windows\system32\ has overwritten the Office 2003 version of MAPI32.dll and they are different.

To fix this problem I just took a copy of mapi32.dll from another Office 2003 installation and placed it in C:\Program Files\Microsoft Office\OFFICE11\ because it seems office will look there first, and voila it now works.

Lazy me

I still can't really be bothered to design a nice site and then maintain it so this is all there is, you could of course check out one of my other sites which are much more interesting.

A little project I have undertaken with the help, support and guidance of my friend Jason is Script Banana, it is a nice directory site for webmasters, web designers and web monkeys of every flavour. The site lists tons of great scripts and code samples from all over the web, whether you need a php guest book, an content management system, a cgi whois tool or a classic asp link manager you'll find it here. We will soon be taking submissions for the key areas (php, asp, and perl / cgi) so please feel free to tell us about your favourite script or component.

I have been teaching myself and visual and hope to use this space to show off some of my scripts and programs, although that is probably not going to happen too soon, as this is the first serious update this site has seen since its inception over two years ago. In that time I have tested and played with a perl based blog, several php content management systems and even tried my hand at various DIY pages, none of which I liked or could be bothered with past their setup, so down they came. This time I am keeping it simple with html and css so who knows.