Posts

Showing posts from March, 2009

Google SiteMap Generator + Input validation failed Error

Since Google release their Google Site Map Generator I have been using it on my web server for the sites that I manage. Setting it up and getting it running was fine and I haven't had a problem, that was until this week.


This week I noticed that as I was only letting the generator update the sitemap from actual URL hits quite often a few of my sites aren't hit for a day at a time which was resulting in empty sitemaps. This then causes Google WebMaster Tools to whinge at you which isn't a good thing. So I decided to update my settings to include parsing my IIS Log Files in the hope it would use previous days ones and not generate blank files.


This is where I hit a road block. When ever I changed a setting and clicked save the generator would be really useful and tell me that "Input Validation Failed" and to basically sort myself out. I was confused to say the least as everything was fine, no field was highlighted as being erroneous so I ended up giving up and leavi…

Book Review: C# 2008 and 2005 Threaded Programming

So last month Packt Publishing contacted me regarding sending me a promotional copy of C# 2008 and 2005 Threaded Programming to review. This is the first time I have been asked to do a book review and decided to take them up on the offer.



Now I have been using ASP.Net for around three years now but I've never had to or decided to look into writing multi-threaded apps so the fact that this book was aimed at beginners meant that I was an ideal target audience for this book.
Packt shortly sent me the book and upon first looking at it thought it looked a bit ugly! I know you can't tell a book by its cover but this cover did put me off, the green and picture didn't do it for me but alas I carried on anyway.



The book is organised into several chapters and is example driven. What I mean by this is that it doesn't give you bags of theory and then an example, it takes the approach of you following along the code examples and then it has gaps explaining bits and pieces. More on thi…

MVC Snippets: must be a reference type in order to use it as parameter 'TModel' in the generic type or method 'System.Web.Mvc.ViewUserControl'

Recently I have been playing with ASP.NET MVC, in particular I have been building myself a new website. I thought it might be good to post any peculiar things / lessons I learn during this build. Tonight I stumbled across one of these lessons.



When you strongly type a view or partial view the type must be a reference type. Otherwise this means you get a HttpCompilation Error: "your data type" must be a reference type in order to use it as parameter 'TModel' in the generic type or method 'System.Web.Mvc.ViewUserControl'. Initially I couldn't figure out what this meant as I was passing my type through, it existed etc. However it was then I realised I had declared my type as a struct not a class.




If you are unsure of the difference between a class and a struct I recommend looking it up, the gist of it is that a class is a reference type and a struct isn't. As a struct isn't a reference type you can save memory due to it not having to allocate addition…

Open Hack Day 2009

Well today registration for Yahoo! Open Hack Day 2009 opened, and with much excitement I signed up hoping for a place.


The previous Hack Day was really great fun even though my "hack team" failed to finish our project. This year I'm hoping to do something a lot simpler but as enjoyable.


Here's open I get a place ;)