DasBlog Login issues
Wednesday, January 03, 2007 11:26:03 PM (GMT Standard Time, UTC+00:00)
While updating the layout of the DasBlog I needed to alter some of the source code to output lists rather than tables etc and after uploading the latest version of the blog the login form suddenly failed to work. When logging into DasBlog it would accept the parameters and either kick me out to the error page or redirect me to the logged in page.
DasBlog includes some fairly indepth error logging (not using Phil Winstanley’s Error Reporting code mind you), one of the events it logs is logging in. I noticed that I would get one of two errors when logging in, when I was shown the error page it would say: “Password Challenge was null in ViewState! <br> at newtelligence.DasBlog.Web.LoginBox.doSignIn_Click(Object sender, EventArgs e)” etc and when it took me to the front page it would log: “Audit: SecuritySuccess” and the standard who logged in from which IP etc.
As I’d edited the DasBlog source my immediate thought was that I’d changed something in the login process so I copied the original DLLs back onto the site and tried again without any success. After a fair amount of searching into the issue on Google and the DasBlog forums I was at a loss as to the issue so I asked on the DasBlog forum (http://www.dasblog.us/viewtopic.php?t=417).
A couple of people responded including Tom but sadly none of the suggestions applied to my situation. In the end I found that the issue was being caused because I was running the site under ASP.Net 2.0. When running DasBlog under ASP.Net 2.0 you need to make additional changes to the web.config file as outlined in the install documentation. When setting up the staging site I copied the directory from my main blog so I had the same content to test with, although I remembered to alter all the relevant areas in the site.config etc files, I had neglected to alter the cookie path setting in the web.config. So if you’re getting the same issues, check the web.config cookie path values.
New Year -new blog layout
Tuesday, January 02, 2007 10:13:23 PM (GMT Standard Time, UTC+00:00)
I’ve never really been happy with the look and feel of this blog and felt that it needed jazzing up a little –especially now I’m getting more and more hits on it but life got in the way and as ugly as it was it did however do the job.
Over Christmas though I decided it was time to bite the bullet and cut to the chase etc and update it. The blog was running on DasBlog v1.8 so while re-working the theme I would also update it to the latest version v1.9.
This is the final result, it’s still a work in progress as I would like to improve the XHTML compliance but as usual time got the better of me so that’s something that will have to be fixed later. It’s certainly an improvement over the old blog though don’t you think?
Over the next few weeks/months I’ll finish editing the source to improve it’s compliance and also update my photo album so it’s more in-line with this site. Don’t forget www.thesitedoctor.co.uk is having a revamp in 2007 too.
So, worth the effort? Here's the old layout:

Marketing your business in the newspaper
Tuesday, December 19, 2006 8:10:52 PM (GMT Standard Time, UTC+00:00)
I had an interesting chat with Chris from Jump'in Jacks'bouncy castle hire about marketing his new business Mad Hatters party shop (website coming soon I hope!!) in the newspaper. Basically he’s taken out an advert with a local paper but I don’t personally feel he’s gone about it the right way. Seeing as he’s not the first client I’ve spoken to about this in the past month (Miss Mays adult store to name another) I feel I should explain why I feel he’s made a mistake.
The scenario*
You want to promote your new fancy dress shop to the local market. You decide the local (free) paper is the best method so you take out an advert in your local paper that is along the lines of:

*This is similar but not exactly the same as Chris’ scenario ;)
What’s the problem?
I’m not a marketing person but common sense tells me there are a few issues with this scenario but primarily you have no way of evaluating its success. How will you know whether it’s worth spending that £x again?
What should you do?
When planning on promoting your business in i.e. the local newspaper, a little research wouldn’t go amiss. Firstly work out who you want to target with your advert, then work out what the best medium to contact them over is and then research that medium itself.
Taking the scenario of a fancy dress shop that would like to capture more local trade, the local paper is a good place to advertise. The first problem I foresee is; locally we’ve got at least 3 different newspaper publishers and each has its own main catchments area, more than this, I know at least one has a dedicated paper for each area. With a little research you can work out which paper is most suitable for your establishment. Remember that you should identify the local paper for your establishment not the local paper for your residence as unless you live above your shop, you’ll most likely find out that they’re two different papers…
Depending on your budget I would recommend running a single campaign in each local publication. How you go about this is up to you, if you’ve got time, select a different paper each time until you’ve had at least one advert in each (you could run two different areas at the same time but having two adverts within one area may mean you’re advertising to the same person twice which would be an unfair test), you’ll then be able to judge which paper had the best return. Make sure you use the same advert for each paper to make it a fair test! It’s also worth noting that it’s commonly recognised that people need to see an advert three times before it registers with them.
Once you have your chosen publisher it’s time to design your advert, you’ll obviously be restricted by budget but get the biggest area you can afford (within reason), for a voucher promotion something A5 size should be more than enough. If you can afford a designer give them the brief and have them mock something up. They should be able to do something pretty decent that can be reused for around £100.
When you’re designing the advert, don’t just throw on your contact details and think that’s enough. You need a clearly defined call to action, this could be anything from a discount to a competition. The idea is to get someone into your shop so give them a reason to go there!
It may also be suitable to gather some data about your customer, many people don’t mind giving you a little information about themselves if they’re getting something cheaper (or free!) so take advantage of that* -you’ll be able to use it for direct marketing or customer analysis later.
*Also look up the rules and regulations around Data Protection.
Ready to go? Not yet. You still don’t have any way of telling which campaign was most effective. Most email campaigns now include something called a beacon image which tells the campaign manager that you’ve opened the email, sadly you can’t get this information from the newspaper but you can track the conversions by adding some form of identifier to the voucher. In my example below I’ve added a tracking code “EP19120310P” it’s perhaps a little overkill but it basically stands for: “Example Paper 19th December 2006 10 Percent Off”. This is important as when you come to analyse the conversions you’ll quickly be able to identify not only which paper it came from, which date but also the offer. Using something along these lines will enable you to track different offers in different papers (or even the different offers in the same paper), by varying the offers you’ll be able to identify the best conversion.
Now you’re ready to go, get the advert placed and on the day of publication get hold of a copy and check out your location, see how you stand out in the paper, if you feel your advert doesn’t stand out as much as the others on the page, work out why, is it the use of specific colours? Or perhaps theirs is in a better font –make a note of it for the next advert!
Finding the ideal combination of paper and offer will be trial and error but as long as you have a method of tracking, analysing the results and quantifying the conversions it shouldn’t take you too long to establish which campaigns pay off and which are just costly.
This is just a quick mock-up using the same area as above as an example, I’m neither a marketer or designer so I’m sure there’s plenty of flaws with this (hint: post a comment on them)!
Original:

New:

In summary
- Research your target audience
- Identify the best publisher to use
- Plan your advert and clearly outline your call to action
- Add some method of tracking to the advert
- Analyse your results and adjust your future advert(s) accordingly
Dual records in the ASP.Net authentication table
Friday, December 15, 2006 2:38:10 PM (GMT Standard Time, UTC+00:00)
I recently updated one of our sites to use a shared authentication database to save on the maintenance, but in doing so I messed something up and couldn’t work out why I was getting dual records of the user. To summarise what I’d done, I had updated the applicationName value from “/” to “SomeName” and then updated the values in the database to reflect these changes.
In addition to having duplicate records for the users, the LastActivityDate was only being altered on login and subsequent page requests were not being noted which was a problem as this system requires this data. I did look into alternative methods around this until I realised that one of dates for the user was actually being updated –just not the roles/membership one!
There are a number of posts discussing doing this pre-userbase which were about as useful as a chocolate fireman. I finally realised that I’d not added the provider node for the profiles which meant it was not only reverting to the old connection string named “LocalSqlServer” but it was also assigning “/” as the application name. After updating this node all’s fine and dandy again.
For future reference, you need to override 3 web.config settings to ensure your application is referencing the correct database and within each one add the <clear /> node otherwise your application is likely to inherit from the machine.config (I’d got that one!!):
Web.Config Settings
<membership defaultProvider="YourMembershipProvider">
<providers>
<clear />
<...>
<add name="YourMembershipProvider"
applicationName="YourApplicationName"
connectionStringName="YourASPNetSqlServerConn"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
<roleManager>
<providers>
<clear/>
<...>
<add name="YourRoleProvider"
connectionStringName="YourASPNetSqlServerConn"
applicationName="YourApplicationName"
type="System.Web.Security.SqlRoleProvider" />
</providers>
</roleManager>
<profile enabled="true" defaultProvider="YourProfileProvider">
<providers>
<clear />
<...>
<add name="YourProfileProvider"
connectionStringName="YourASPNetSqlServerConn"
applicationName="YourApplicationName"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</profile>
Doug Setzer on Iron Speed / Code Generators
Thursday, December 14, 2006 11:14:09 AM (GMT Standard Time, UTC+00:00)
Thanks to Doug Setzer from 27 Seconds Inc for these thoughts, he doesn’t blog (yet) so thought I would be interested in posting it –not sure why as it would seem he’s my only reader…!
I tend to agree with Doug on this one, I remember seeing Code Smith in action at a previous Developer Developer Developer day and although it does look, I have similar concerns as Doug, IMSHO I'm concerned it makes the developer lazy and forget his roots. IIRC many generators offer the ability to make your own templates but again, by doing so, how much time do you really save?
Not being a code generator user* I’m also somewhat biased but I’d be interested to hear other peoples thoughts.
Tim
*That said, I do have a number of “tools” that I user to generate the repetitive code but these mainly rotate around Excel and are specific to my coding methods.
The decision to use code generators is a long and tricky decision. I'll admit from the start, my slant on code-generation tools is against them.
For one of my other clients, I use a simple code generation application that they provided to me (the guy wrote it). It does a decent job and for their coding style, it works out fairly well. It takes a very simplistic template and can output (to an extent) customizable code.
The problem that I have with all code generation tools is your ability to make changes. Very rarely do you know all of the data, or the extents of repeating data, or the nuances of the code that you have to develop. So - how does the application handle changes? In my case and this (very) simplistic code generation tool - plain and simple, it doesn't. I have to hand-code changes (.NET, ASP.NET and database procedures).
And the last thing - the nuances of the code that you have to develop. How well does a generic tool handle special situations? Again, I know a free/custom-built tool is a far cry from a $500/$2000 tool - but, anything that is outside of a simple CRUD/1-table procedure and again, I'm hand-coding. I can honestly say, 50% of what I'm doing is "special" and doesn't fit into cookie-cutter boxes.
The code generator that my customer gave me did exactly that - it generated code for a database. It was up to me to build the pages and it just gave me an easy database access API. I like this more than tools like Iron Speed because nothing is being done "for" me, I can control the code it outputs and nothing, nothing is "behind the scenes". With Iron Speed, they're doing a LOT "for" you. My fear is what happens if it breaks? Who do you call? Where do you look? And, the purist in me - what does their code really look like? Are they doing poor-design things that ultimately give you performance woes?
Unfortunately, with tools such as this Iron Speed - the only way to know if it'll work for you is to make the plunge, spend the $500 for the pro. version and see how it goes. You can help get yourself a glimpse, looking under the covers by downloading the trial and putting together some little apps in a month. And, I see that they have a public support forum:
http://sjc.ironspeed.com/tool/mb/ironspeed
See what people are saying they love? what they hate? etc.
And, of course - Google is our best friend:
http://www.adtmag.com/article.aspx?id=8421
http://www.developerreviewed.com/ironspeedreview.htm
http://www.angrycoder.com/article.aspx?cid=10&y=2003&m=6&d=8
http://aspadvice.com/blogs/ssmith/archive/2006/04/26/IronSpeed-and-My-Custom-Reports-App.aspx
http://www.411asp.net/func/review?tree=411asp/software/aspcodee&id=5642310&rid=
I hope this helps - it's a lot to digest, but generally what I'm seeing is that it's good for small/simple apps.
-Doug
Mazda –pranksters or...?
Thursday, December 07, 2006 10:46:31 PM (GMT Standard Time, UTC+00:00)
I was missing my GPS manual for the car –no biggie but there were a few functions that I couldn’t figure out (turns out they’re not actually enabled in the car). Anyway, I thought it would be a good idea to write a letter to Mazda asking things like “why can’t I fit cruise control in my RX-8” and “why doesn’t the TMC/RDS work in my RX-8”.
Clearly Mazda didn’t like me asking questions –the response? They replied but didn’t attach any postage! –Genius! Don’t believe me? Check these photo...

For those of you interested, Mazda’s official response on the lack of TMC/RDS (traffic announcements linked to the GPS) is it costs a lot to subscribe...
Miss Mays Adult Store finally releases discount voucher
Wednesday, December 06, 2006 11:16:02 PM (GMT Standard Time, UTC+00:00)
Miss Mays Online Adult Store has finally released it's Christmas discount voucher for your festive fun, check it out -this post is safe-for-work if you don't mind seeing some honies but if your boss is looking over your shoulder, perhaps save this one for home-time ;)
Excel change case -sentance, proper, lower and upper
Tuesday, December 05, 2006 2:38:04 PM (GMT Standard Time, UTC+00:00)
Have you ever been sorting through a client’s product data and needed to change the case of the text? This is a great little add-in for Excel that can help.
Download the zip file and run the xla file, you’ll then have a new option “Convert Text” under your “Tools” menu:

To use it, select the text you want to change and then choose “Convert Text”, you can then choose from:
- lower case
- UPPER CASE
- Proper Case
- Sentence case
It also has a number of other useful options like removing white space, adding characters etc.

Download the Excel Change Case Add-in here