Tuesday, December 18, 2007

My Blog has moved

Please note that this blog will no longer be updated. I have got some cheap webspace and now live at http://www.beakersoft.co.uk

I will still keep this blog active for a while, but there will be no new posts here. Please use my new page.

Thursday, December 13, 2007

Error trying to edit Reporting Subscription

Over the weekend we did a big upgrade, part of witch meant all the reports had to be recreated to work with the new database schema, so I told people they would have to setup any subscriptions again.

First of all I think the being able to create subscriptions is a great idea. The only downside to it is having to specify a username/password to run as (i'm not sure how you could get round this though apart from running all the subscription reports as a specific user), and the fact that it has no built in print functionally.

To get round the lack of printing, we use a product call batch print pro, available from traction-software.co.uk. It is a fantastic piece of software that you point at a directory, and it monitors in there for PDF files and sends them to a printer you specify as they drop in. The setup of it is sometimes a bit odd but it worked well.

Anyway, a user created her subscriptions again but could not edit them once they changed, she kept getting an error when hitting save:

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

The EXECUTE permission was denied on the object 'sp_add_category', database 'msdb', schema 'dbo'.

For some reason, when I looked on the reports server config, the windows service identity section was in an error state. I just put the username and password back in, and it worked again. I didn't even have to restart reporting services

Thursday, December 06, 2007

Internet Explorer 8 here we come

Just a quick post after my rant yesterday, seams like Microsoft is already working on a new version of Internet Explorer , at least according to the IE developer blog. You can read the entry at http://blogs.msdn.com/ie/archive/2007/12/05/internet-explorer-8.aspx

There is no mention of new features or anything yet, but keep checking back as i'm sure they will post the latest info there first.

Friday, November 30, 2007

The world vs Microsoft (maybe)

I was reading a very interesting article on coding horror the other day (http://www.codinghorror.com/blog/archives/001006.html) about browser wars.
This got me thinking about how much Microsoft must be worrying about how the enhancements in browsers and related technology will effect there business model.

When you think about it, most there money comes from selling operating systems and Office products. Now, browsers are becoming more and more the platform of choice to write applications on. it makes sense really.

The app will run on any device with a net connection (including phones, pda's etc), you can almost guarantee it will work, there is no need for the user to install software, updates are easy to roll out, ease of distribution, the list go's on and on.

While as it stands there aren't to many office based application that can challenge the MS office in the features category, there are certainly very capable alternatives out there, the main one being Googles offering, Google docs (http://docs.google.com/). All the documents are saved online, so you can give other people access to them and wherever you are in the World you will always have access to your data.

One of the only downfalls of online applications is when you lose your net connection. We'll Google have even come up with a way of getting round that. It's called gears ( http://gears.google.com/).

I dont personally know all that much about it, its a framework that will allow you to build web based applications that will also work of line. At the moment the only apps I have seen that use it are Google ones, but i'm sure more will be popping up.

So, are the mighty Microsoft doing anything of there own like this. Well, a bit. They have bought a stake in the social networking site Facebook (http://www.facebook.com/).

One of the cool features of Facebook is the fact that you can create applications using there framework, and post them to the community. As the Facebook community is absolutely massive (according to compete.com 14 million used applications in Facebook in August) your application will get a lot of exposure.

On the back of this Microsoft has added support via a developer kit into its Visual web Developer product (http://www.microsoft.com/express/samples/facebook/default.aspx). The thing I find funny about this is when you look at the Facebook developer documentation it's language of choice is PHP. Will this be changing to dotnet now Microsoft have got there claws into it?

So, are Microsoft trying to embrace the internet as its development platform of the future, or sticking to there so far successful business model of traditional desktop software. I'm sure we'll find out over the next few years.

And just out of interest, while we are talking about browsers, this is a breakdown of what browsers people visiting this site have been using over the last month:
While using this site as a test bed may not be the fairest judge of what people are using (most visitors will be more aware of what browser they run than normal users) , it does still indicate that no matter how much the other company's push there alternatives, the Browser of choice is Internet Explorer.

Thursday, November 22, 2007

Firefox 3 beta 1

Firefox 3 is now at its beta stage, so i've decided to start using it. you can get more details at http://developer.mozilla.org/devnews/

As well as a new rendering engine (gecko) there are various new features, such as the places options that let you easily bookmark and tag you favorites, and have fast access to them. As its a beta its probably not a good idea to use it on any production machines.

On another note i am in the process of creating a new blogg based on the wordpress platform. I've not fallen out with blogger or anything like that, its just that wordpress gives me more flexibility over what I can do. You can check it out at http://www.beakersoft.oldmanales.co.uk.

Its a work in progress so some things might not be perfect yet

Thursday, November 15, 2007

Going Green - Creating a PC Shutdown Script

There's been a lot of talk throughout the IT industry recently about being more 'Green'. Well, being all for that and also sick of users who leave there pc's turned on all night for no good reason I have come up with a script to turn of pc's.

The script looks into Active Directory for computer objects in a specific OU, loops through all of the computers and creates a batch file that calls the windows script Shutdown.vbs. This is a script that comes bundled with XP, and allows an administrator to shutdown a remote machine from the command line.

You can download the script from http://www.beakersoft.oldmanales.co.uk/ShutDownPCs.txt

Rename the file to a .vbs file, change the 3 variables at the top of the script to match your environment and it should create your file. A couple of things to note before using this script:

BE CAREFUL! You could end up shutting down servers or client machines that are being used. I would make sure first the pc's are ok to shutdown, and only run the script after you know the users aren't likely to be using them.

This script will not forcefully close open applications, so not to lose any users work. If you really want to force the machine down (even if the user has un-saved open work) you can add a '-f' switch to the script on the line where it writes the computer name out to the file.

You will need to be a Domain admin or similar to shutdown the remote machines, or you'll just get an access denied errors.

As I mentioned before this could be dangerous so make sure the pc's are ok to shut down before running the script.

Wednesday, November 14, 2007

More on Spiceworks 2 Beta

I Got an email this morning that contained a link to a page with some more info on the upcoming version 2 of Spiceworks, read more about it here - http://www.spiceworks.com/2.0/preview/

The website looks very snazzy, but there doesn't seem to be all that much in the way of new features. They are putting a lot of emphasis on it being 'Faster'. Hopefully the web interface will preform a little better as sometimes I found it a bit laggy, but I thought the actual scanning of the devices was quite fast, considering how much it was doing.

There is something in there now that looks like it will collect event logs from you devices, that is a nice touch but not all that much use to me personally as we us a syslog daemon from Kiwi and Snare agents on the servers to send the logs out. The Kiwi syslog good for setting up alerts based on events you specify, hopefully you will be able to do something like this in Spiceworks

The rest of the updates look like they are purely cosmetic. Graphs and things look nice but they dont really bring much to the app, I would have liked to have seen the ability to extend it with user submitted plugins, now that would have been a real step forward

Monday, November 12, 2007

Spiceworks and Firefox Beta Time

I noticed on digg.com a couple of days ago there was an story about Firefox3 not being in beta, but is is out soon its worth mentioning it. You can see all the happening at http://wiki.mozilla.org/Firefox3, but these are a list of upcoming features:

Improved bookmarking system called 'places'
Improved support for add ons
New version of the rendering engine Gecko 1.9

See the above link for more details. You can download the current Alpha (9) but as the beta's out soon unless you are a developer are very curious then probably best to wait for that.

I also received an email from Spiceworks, about a beta version of spiceworks 2 beta. You can sign up for it at http://community.spiceworks.com/s2goodies/betatesting.php. At the minute they seam to be keeping quite about the features, but there is a thread at http://community.spiceworks.com/topic/6244 that has a bit of information

Thursday, November 08, 2007

API Wrapper Classes

The past couple of days I have been on a short course run by one of our vendors about using the API from one of there products.

Now I have to firstly applaud them for making there product open enough for us to call it using its api, there are some bits of business logic missing, but for the most part it is very good and very well documented.

The only problem with it is the amount of parameters you can pass to some of the methods, and the amount of information you get back. In some case's there are over 30 inputs to a method, but only 2 are mandatory. So Calling the API could look something like this:

result = AppInteraction.API("APICustSearch", pi_pointer, pi_source, type.missing, type.missing, type.missing) etc etc

This kind of code while functional can get very messy and hard to read. What we could do with is a class to wrap the functionality of the API calls in.

First thing to do is create a couple of classes for the input and outputs of the method. This example is using the method called APICustSearch, it will have 5 possible inputs and 3 outputs.

Public Class CustSearch _input
Public Spointer As String

Public Source As String

Public date As String

Public Active As String
Public MinSpend As String

End Class

Public Class CustSearch _results
Public Result As Integer

Public Resulttext As String

Public Custname As String

End Class

The above classes just deal with the inputs/outputs of the api, next we need to code the actual api call into a class:

Public Class AppWrapper
' Defintion for API APICustSearch
Public Function CustSearch(ByVal oInput As CustSearch_input) As CustSearch_results

Dim oApp As New AppAPI.Interaction
Dim oResults As New AppAPI.colGeneric
Dim oReturn As New Suborderrestart_results

oResults = oApp.API("APICustSearch", oInput.Spointer , oInput.Source, oInput.date, oInput.Active, oInput.MinSpend )

While System.Runtime.InteropServices.Marshal.ReleaseComObject(oApp) > 0
End While
While System.Runtime.InteropServices.Marshal.ReleaseComObject(oResults) > 0
End While

oResults = Nothing
oApp = Nothing

Return oReturn
End Function

End Class

So now we have our class to call the functionality of the API method we are interested in, we can easily call it from our application like so:

Dim App As New AppWrapper
Dim CustSearchParam As New CustSearch_input
Dim search_result As CustSearch_results

With CustSearchParam
.Spointer = "12345"
.Source = "API"
.date = "08/11/2007"
.Active = "Y"
.MinSpend = "0"
End With

search_result = App.CustSearch(CustSearchParam)

'this is some checking specific to the API i was working with. If the search_result.Result was not 0
'an error had happened and the details were in search_result.Resulttext
If (search_result.Result <> 0) Then
MessageBox.Show(search_result.Resulttext, "Search error")
End If

If (search_result.Result = 0) Then
MessageBox.Show(search_result.Resulttext, "SubOrderRestart Suceeded" & vbnewline & search_result.Custname )
End If

You will obviously have to tailor the classes based on the api you are using, but you can just add all the methods you use the the AppWrapper class, and create new input and output classes based on the spec.

Apologies for any errors in the example code, I have re-written sections of mine to make it more generic, but hopefully you should get the idea

Tuesday, October 30, 2007

Partition Recovery

Just a quick post to mention I managed to get my data back of my external usb hard disk I thought I had lost. I downloaded an app called Partition Table Doctor from http://www.ptdd.com

As soon as I ran it, it found my external disk, and said it could repair the partition on it. It did its stuff, I saved the partition back to the disk rebooted and I could see the disk again.

It only cost $40, so its well worth it!

Monday, October 22, 2007

Adventures in Ubuntu - Part 1

Over the weekend i blew my home pc away meaning to install XP and Ubuntu side by side. However, i'm only using Ubuntu at the mo, due to the fact that some how when I tried to re-install XP somehow the my USB hard disk got stuffed, so i'm not happy.

I'm not entirely sure what happened, it looks like the partition on the disk has been deleted as I can see the disk in Windows disk management but it wont mount the disk and giving it a drive letter. I blew away the Windows install and put Ubuntu on to see if that could see it any better but nothing. So i'm now looking for something that will hopefully be able to re-build the partition.


Anyway on to the Ubuntu install. The first problem I has was using the default install it kept hanging on what looked like loading the drivers for my graphics card. I started it in the cut down installer and it seamed far happier and completed the install without any other problems.

As it rebooted my display seemed up to scratch, and I heard the startup sound so that meant at least my sound card and vid card were both in working order. Problem was when I logged in my wireless network card wasn't being listed as a device in the network config.

The first thing I did was check in the Hardware manager to see if it had recognized any hardware at all. It had as you can see below found the hardware, it just did'nt know what to do with it.

Knowing that it had found my hardware i started searching around the newsgroups and came across this page here.

This contained virtually everything I needed to know to get my card up and running.

I had to install the ndiswrapper packages, using the package manager, as below. All the files were on my install cd so I did'nt have to download them.

using this I could then load the windows driver for my card. I then had to create a new entry in my network config file for the interface.

After a reboot I could see the wireless access point using iwconfig command, but I couldn't get an IP address. I put a static IP address in, but I still couldn't connect to anything. After a bit more searching I read about people who had a similar problems, and it came down to the encryption being enabled on the wireless access point. I disabled it and hey presto I could get a connection!

So, not ideal but at least I could now get a internet connection.

After all this i am going to blow the pc away again to get XP back on, but Ubuntu will be going back on as well. I will still have to try and get my graphics card working better as all the modes weren't available and I couldn't seam to get that 3D desktop Compiz Fusion working ether.

Judging of my experience doing this install I would say that Linux still has a fair way to go before its going to be wildly accepted by the majority of home users. I wasn't to hard for me to get working, but i suspect the average Joe in the street will go no wear near it if they know they have to hack about with config files to get it working

Tuesday, October 16, 2007

Facebook and Linux

I've decided to join the 21st century, and sign up to a social networking site. I chose facebook for a couple of reasons -

I HATE the navigation and layout of myspace. Lets face it, its awful. And your profile is open to everyone witch I dont like
Most people in the real world I know have Facebook profiles, and dont use anything else.
Facebook just looks nicer and seams to be 'cooler' at the mo.
You can write your own apps for Facebook, and that brings me onto my next point.

I've decided I want to write an app for Facebook, problem is they seam to want you to use PHP witch I have never touched before. There are unofficial libraries for other platforms, but i've decided to take the plunge and try and learn PHP and write the app in that.

And then, i've also decided i'm going to write the application under Linux, something i've never done before. My pc at home needs re-building so when the latest version of ubuntu (7.10) is released this week i'm going to install that along side Windows XP.

I've used Linux in the past, but only when i've had to. This is going to be my chance to experement with it from scratch. It will probably take me ages to even get it installed with all my hardware (I want all my stuff working), but i'm sure it will be worth it.

Anything I come across while on my quest to use Linux to develop my app I will of course post on here.

Tuesday, October 02, 2007

Google Maps and IE6

I've been doing some messing about over the last week or so with the Google maps and Fickr API's, to get photos on Flickr displayed on a map.

After much tinkering and hacking around, I finally got it working. You can see the results on my beer website at http://www.oldmanales.co.uk/feat_OktoberFest07.asp

While writing this I came across a strange bug that seamed to effect IE6. I only started noticing it the last couple of days though, so maybe Google have been messing with the code.

Anyway, what would happen is when I loaded my map I got the little error icon at the bottom left corner of my browser. Double clicking it gave this error:

GIcon is undefinded

GIcon was the variable I was using to create a marker on the map that you can click and it would show a pop-up window.

I looked at a few posts, some suggested changing the version of the maps api, some building the icon differently and a couple more. However, the only one that worked for me was going into IE's advanced settings and turning on allow HTTP 1.1 through proxy connections option.

Once this had been turned on I know longer got the error and my map is displayed without ant problems.

Once I thought about the error I realised that I noticed it first when I checked the map at work, using a proxy server, and judging by the name of the setting it probably only happens when using a proxy to access the web.
I'm not entity sure what the setting means but i will look into it.

On the topic of the map, once I have finished it off all the features i want to put in it and I've tested it as much as possible i will post the code for it on here.

Tuesday, September 25, 2007

Life without email

Due to the fact that a Dell engineer managed to corrupt our exchange database yesterday, we have been without email all day, and its not looking good for getting it back any time soon.

We have tried restoring from a backup but that appears to be corrupt as well as it wont mount, so we are running Eseutil in the fix mode. The database is about 60gig we set the fix running at about 10 this morning, and at 5:30 I dont think its finished yet. Then we have to run a defrag as well, so that's going to take another 7 hours or so. People are going to be pissed.

It got me to thinking I might start to research collaboration software, it's amazing how much of the Business has been effected by having no email. The amount of people that distribute documents, use shared calenders, plan meeting etc with Exchange means its no longer a case of email/exchange being classed as a non business critical system, witch we kind of do now.

Using something like sharepoint might be the way to go, that uses calenders, blogs, Wiki's and file stores and is fully updatable by the users.

Problem is going to be weaning them off the Outlook/Exchange way of working.

Monday, September 24, 2007

I cant believe we pay these people

We have had a problem with our mail server losing disks, even after new ones have been put it. The disks just went to error as soon as we put them into the server, so we had a Dell engineer out to replace the backplane.

He turned up, replaced it and put a new disk in but the disk didn't come up and start to re-build right away. Instead of thinking why it didn't start to re-build the array onto it, he seamed to take a wild guess and click the online option. The disk then said it was re-initialising, witch didn't seam right but he insisted it was. He then left.

We came to bring all the mail stores back online, and lo and behold we got tons of errors about checksums, invalid data etc, so we rang Dell tech support again. The bloke told my boss that he should not have on-lined the disk, as that just brings it straight into the raid5 array without putting the data on it first. There is a re-build option he should have used.

So, we are now going to have to blow the whole virtual disk away, and restore the data from this afternoon when we took a backup.

If i went round blowing peoples data away I would get sacked, so I hope the bloke who came on site and did this gets a good ass kicking!!

Monday, September 17, 2007

Melting server room

Its been a bit of a shit day today. The people who look our building decided to do some work on the air conditioning systems today. Normally this wouldn't be a problem, except they didn't tell us what they were doing, and the only air con that seamed to be affected was in our main server room!!

It started to get mightily hot in there, at one point it got up to 38C, we had various fans in there but nothing seamed to be getting rid of the hot air. The best thing seamed to be getting a long foil tube, putting one end over a large fan situated at the back of the racks, and the other end out of the door. This got rid of a lot of heat until the portable air con's turned up.

We managed to get away with very little initial problems, the watchguard firewall overheated, switched itself of and lost its config, various server lost disks and everything was reporting heat warnings.

The only complete failure was a Dell poweredge 750 server that was running websites for our editorial system. This went down, and refused to power up again while it was still in the rack. We moved its services onto another server, and when it got a bit quieter we took the server out of the rack. When we got inside it, we found a section of the main fan had broken off completely, and fan blades had been tossed all over the server!

So we got the fan out of the housing, and it looked as though the bearing had gone, so the fan was lose in the casing. Presumably the blades had hit something and this is how they snapped off.

We then looked into Dell IT assistant and one of its last temperature warnings was at 88C, no wonder a couple of hours later the CPU was still to hot to touch.

So let this be a lesson, always make sure your air con and its backup units are in working order!

Monday, September 10, 2007

Auditors (why would you do that job)

Joy of joys, last week we had the auditors in, for 3 days no less. Now call me uneducated, but why would anyone want to do that job. One of them said to me (while looking for paperwork about a user account that never existed) that he 'didn't enjoy doing this', problem was he had a big grin on his face when he said it. Hmmm, i'm sure he wasn't lying at all.

The good thing was we had covered most of the things they wanted, so they started to get desperate (they aren't doing there jobs if they cant find anything wrong). One of the 'problems' was apparently the windows on the server rooms were a security risk, we're not sure why though. We found the best thing to do was to give them something small to get there teeth into and then leave them alone. The were chewing over 'missing documentation' for a small software version change for about 4 hours!

Because we knew they were coming, we tried to go round as many as the servers as we could and make sure they were fully service packed and patched. Just for a change, I managed to hit a couple of problems, this time it was with SQL reporting services not starting when I rebooted the server.

The first thing I noticed in the event log was a shed load of errors in the system log looking something like this:

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID


to the user \mossService SID (S-1-5-21-). This security permission can be modified using the Component Services administrative tool.

I hunted the net, and this article solved this problem:

After a doing as suggested in this article, the DCOM errors stopped, but the SQL reporting service still wouldn't start, all i was getting was the usual 'did not respond in a timely fashion' type of error in the system log.

So another search led me to this article:

Applying this reg key and rebooting then brought the service back to life. Reading more about this it seams that its just a timing issue. Why should applying a couple of patches cause a server without any problems to run its services up slower than it used to? Most of the things I found said this should only happen on slow servers, not after dodgy patches.

Saturday, September 01, 2007

Fun With Faxs

Been doing some work this week trying to get a faxing solution working using our VOIP (voice over ip) systems. We were trying to come up with a solution we could use as a group, that would allow users to have there own number for clients to send to, and the fax would be delivered to the user as an email.

We read up about fax over IP, it does exist but apparently its not very good, the line has to be clean with no noise otherwise the fax machines cant handle the call. Due to the fact we would be using the VOIP network we decided not to pursue this route, and to attach an ATA device to the VOIP network and then to a normal analogue modem. The ATA just lets you use normal analogue phone/faxs/modems on the VOIP network.

What we then wanted to test, was if we could get caller ID information out of the modem, the idea being that if caller ID was working then we should be able to get out the number the customer has called, so we know where to route the email.

Using a Hyperterminal session to the modem, we called the modem. If the caller ID is being passed then, between the first and second ring the caller ID info should pop up. This is where the real fun began.

The first few times we rang it nothing came through. Doing a bit of research, quite a lot of modems didn't support caller ID in the UK, and most of them didn't have the feature turned on by default. Looking round the web, we found a couple of commands to try on the modem to turn on caller ID, they were


After now managing to turn it on, we rang the modem, and hey presto the caller id came through! Just as we thought we were getting somewhere we found another problem. If we rang the modem, hung up and rang it again within about 5-6 seconds the caller id didn't come up. Wait about 15 secs and it worked again. We tried this with two different modems and the same things happened again.

So the caller id was'nt very reliable going over the VOIP network and through the ATA box. We then got the VOIP guy to try and get it to send the called number anyway, he turned it on, we sent a fax but the info didn't come through to Windows Fax services. At this point we started to realise our idea might not work very well.

Next week we will probably play about with it a bit more, but looks like we are going to have to do it another way. The other ideas we have or try and use Fax over IP to see how well it actually does work, you get get some modules for Hylafax etc so we might try that. The most likely option i think we will do is use a ISDN30 , attach the lines to that and put a card in the server. We know this option works as one of our other centre's currently uses this method.

Thursday, August 16, 2007

Exporting SQL Services reports to Excel

Just a quick blog about something i've noticed over the last couple of weeks. Have you ever tried exporting your reports to Excel spreadsheets, and got unpredictable results?

You know what its like, most accounts type people insist on working Excel (even though you could just change the report to suit them), but sometimes when you export the report to excel extra columns appear. Then, you can export the same report again and the extra columns you had before will no longer be there. The problem accounts people have with the extra columns is it stuffs up any sorting they want to do, and any macros they have written that depend on specific data being in specific places.

The best way to get round this seams to be to remove all the dynamic text boxes etc from the headers and footers of the report. I think what must happen is if the info in the headers doesn't align exactly with the tables in the main section of the report, it throws off the export.

I've now got two copies of the reports that the accounts people tend to use, one with the headers and footers still in, and one they can use to export into excel.

Wednesday, August 15, 2007

Reports Server subscriptions and Dates

Ahh, the joys of SQL reporting services. While it is a very powerful piece of software, it has some obvious (in my opinion) features missing.

Problem: User wants to schedule a report to run, the dates need to move on every time it runs but the different parameters mean that they dont move in a consistent way, ie on the same report they want to run for one customer for Monday to Wednesday, for another they want just one day etc.

The subscriptions in SQL server reporting services lack the ability to move dates on within the subscription. You can run it for the default, or specify specific dates. When you want to run the same reports for across different ranges for different customer this is not very helpful, so we came up with a clever solution.

Within the sql on the report, instead of the sql reading something like:

startDate >= @par_StartDate AND EndDate <= @par_EndDate

We have create two parameters, one called par_StartOffSet and one called par_EndOffset both being integer data types. We then change our SQL to look like this:

startDate >= CONVERT (datetime, DATEADD(dd, CAST(@par_StartOffset AS int), DATEDIFF(dd, 0, GETDATE())), 103) AND
endDate <= CONVERT (datetime, DATEADD(dd, CAST(@par_EndOffset AS int), DATEDIFF(dd, 0, GETDATE())), 103)

So, what does this allow us to do. Well, the SQL we have now always start from the current date, it then takes our parameter and adds/subtracts this from the date today. We do this on both the start and end date.

This means that now, when we create a subscription we dont have any date parameters, just two offset ones. So, if you scheduled your report to run on a Friday, and wanted it to run for Monday to Wednesday of the current week you would set the startDate param to be -4, and you endDate param to be -2. Now with the same report you can make it run for any date ranges you can think of!

Just a quick side note, you might notice in the sql we are specifically casting the 2 params to be ints. Even though we told the parameter to be an integer in the parameters menu, i got this error when trying to run the report

I'm not sure if this is a bug, but in the IDE (I cant imagine it is), but I dont see why I specifically cast the parameter when it's already an int?

That tripped me up for a bit but I guess the fix is kind of obvious.

Monday, August 13, 2007


Due to the fact we are going to get an Audit, we have recently installed Spiceworks on our network. For those who have never heard of it, Spiceworks is a web based appliction that gathers information ion all the devices on your network.

Using WMI it gets hardware and software information for each device, and records it all in a database. We are going to use it for its software auditing purposes, it will give you lists of sortware installed on your network, and you can upload details of your licences into it to keep track of what software you have that is legal. I think it will even warn you if some new software appears that's new or unlicensed.

The thing that makes Spiceworks different from its rivals, is that fact that it is completely free. The only thing that it does do is display advertisements in the browser console. Now, call me daft but i'm quite prepared to put up with an advert (they dont take up much room or distract you much) if quality software like this is free.

Some of the auditing tools we have used in the past haven't been very good, there main problem used to be picking up windows components and listing them as separate software, so you ended up with a huge list that meant nothing. Spiceworks manages to filter all this out into a list that actually makes sense and work with.

The only problem we had was upon running a scan, there were quite a few errors (about 20% of machines). They said something like cannot get authenticated on the client. There is a page you can call up on the client machine that will attempt to diagnose the problem (urlofspiceworks/fix), upon running this we could see it was trying to authenticate on a different machine. A quick look in the reverse DNS lookups told us that the IP address of our problem client was in DNS numerous times with different names.

A quick clean up of DNS and a re-scan in Spiceworks, and virtually all the problems had gone. For small to medium sizes networks, I would recommend downloading it and giving it a try. Get it from www.spiceworks.com

Saturday, July 28, 2007

Betas, Betas everywhere

Loads of Stuff seams to be in the pre-realise (beta) testing phase at the minute. I have just downloaded the beta of the bbc's tv-on-demand service, iPlayer.

Using this you can download programs broadcast over the last 7 days, and then have a limited time to watch them on your pc. I think the technology is peer to peer based, so presumably downloads of more popular programs will happen quicker.
The only thing that it seams to have against it at the minute is it will only work on Windows XP machines, running Internet explorer. It even moaned at me when I accessed the site using Firefox. Reading stuff online it does seem they will be releasing a version in the future that will work on Linux/OSX and with other browsers, so most people wont have to wait to long. You can sign up to the beta (if you live in the UK) at http://www.bbc.co.uk/iplayer/

Also in early testing at the mo is Firefox3. You can download the current Alpha version and find out about all the new features at http://wiki.mozilla.org/Firefox3
There's quite a few cool new things planned, there are updating the rendering engine to improve speed and support for new standards, improving the way updates work, developing a new way of storing bookmarks (now called 'places') and various other things. I think ill wait until a Beta version comes out before downloading it though, I've not really got a machine I can easily blow away if it stuffs it up!

Its not just software that's in the testing phase, we are getting a prototype laptop at work that has a solid state hard drive in it instead of a traditional spindle based one. This seams where the future of disks seams to be going, its understandable really especially as the amount of data you can get on them is ever increasing. They will be especially suited to laptops as well as they will draw much less power than existing disks due to there being no moving parts. Pity its not coming into my office so I wont be getting my hands on it!

I've also has another article published on aspfree.com, its the second part of the one I did about controlling Windows fax services, you can read it here

Sunday, July 22, 2007

Windows 2008 Beta 3

We have installed a copy of Windows 2003 beta 3 to do some testing with, mainly to see if the terminal server side of thing has improved any.

We have a problem using DTP packages over a terminal server connection, when moving pictures around pages it takes about half a second or so to respond, some of the documentation from Microsoft says there have been quite a few improvements, so we decided to check them out.

The first hurdle was installing it! The installer is for DVD, and most of the boxes we could install it on to test didn't have a DVD drive. We tried installing it as a virtual machine on a VMWare server, but it would not go onto here at all.

In the end we had to pull a DVD reader out of another machine, and load it using this. Does this mean in future servers are going to have to ship with DVD readers as standard if Microsoft is going to be shipping its server OS's on DVD?

Anyway, we finally managed to load up the server, and after a bit of head scratching managed to join it to our domain. Hunting round the config screens we managed to find how to install it as a terminal server, so we could start doing our testing.

The documentation Mr Gates and Co. said that there was now a feature where a user could run an application on the terminal sever as if it was on there desktop. We weren't sure how this was going to work, but it sounded like a good idea, we found where it was configured and added wordpad as an application to run in this way. There was a wizard to run that created the connection to the application so I ran that, and it generated me a .rdp file, witch i wasn't really expecting it to do.

Still full of hope and optimism, I copied the .rdp file to my desktop and ran it, expecting something cool to happen. I logged into the terminal server, and all that happened was wordpad ran up as soon as I logged in. That was it. When I closed wordpad the terminal server connection closed its' self. Now, maybe I was expecting something a bit special, but I cant see that solving anyone's problems!

I had a look at how this amazing leap forward in thin client architecture was accomplished, and found in the .rdp file the wizard had created, all it was doing was launching the app on start up, as illustrated here

Windows Server 2008 introduces new functionality in Terminal Services to connect to remote computers and applications. Terminal Services RemoteApp completely integrates applications running on a terminal server with users' desktops such that they behave as if they were running on an individual user's local computer; users can run programs from a remote location side-by-side with their local programs

We continued doing some more testing by installing QuarkXpress on the server, and seeing if there were any noticeable improvements to the picture handling, but there appeared to be very little difference between this version and what 2003 does. Maybe its time to start looking at Citrix.

Anything else interesting I find on 2008 server ill blog about here

Thursday, July 19, 2007

Open to everyone

If you look at the right hand side off my blog now, you'll will see that you can now translate my blog into different languages. The idea came about when I was looking on FeedBurner at the different places visitors were coming from, and all the different languages they were using.

I had a quick look around the web to see if there were any 'widgets' I could steel to accomplish this. The only one I could find was using Babel fish by Alta Vista, you can get it at http://www.altavista.com/help/free/free_searchbox_transl the only thing that put me of using this was the Google translate tool supported more languages.

So I headed over to http://www.google.com/translate_t, and basicly looked at the source code of that page and created a form of my own. Now if you click on one of the flags it will translate the blog page your are looking at to your language. Simple but effective!

If you are in the UK try and get hold of a copy of this weeks IT Week, on page 27 there's a really interesting article about a company doing some interesting research into the future of power consumption. Unfortunately I can find it on there website so you'll have to get hold of the magazine.

Monday, July 16, 2007

Navigating XML and Unknown Injurys

I learnt something about readingXML file's today, using VB.net and XPath.
I had an xml file, and some of the data in it were tags similar to this:

<CustomField name ="title" type="str">This is a Title</CustomField>
<CustomField name ="titleDate" type="dte">01/01/2007</CustomField>

So, couldn't just navigate to the CustomField tag, as there was more than one of them. I've never really gone to much into how to navigate round an XML file, i've always just gone straight to the node I was interested in and pulled out the data.

This time, I had to delve more into the XPath navigator. I found out I could use the following in my XPathNodeIterator, to return me only nodes that contained the attribute title:


I could then iterate round all the retuned nodes and process the data. Some of the XML processing tools and classes in .Net do take a bit of time to get your head round, but they do seam to work well and are very fast.

On another note, I went over on my ankle playing football (soccer if your in the US) on Sunday, it swelled up pretty bad so I went to the hospital.
They sent me for an x-ray, and it turned out it was just badly sprained this time, but i've broken or chipped it before and didn't notice. How the hell did that happen!
I'm now stuck at home for a couple of boring days to let it heel a bit, they said i shouldn't even drive for a week. Not bloody likely!

Got another article on aspfree.com its about controlling Windows 2003 fax services through an application, you can read it here

Monday, July 09, 2007

Simpsons Movie Site

You have to go and check out the Simpsons movie site (http://www.simpsonsmovie.com) when you get a spare 5 mins, its brilliant!
Quite a lot of the sections of Springfield aren't up and running yet, but there's some really cool stuff on there, like the ability to create you own character, this ones me!

All the trailers are on there, loads of desktop wallpaper and screen grabs from the movie.
There's also some games to play, like a wrecking ball one (like in the first trailer) and a card where you have to follow the Joker.
A good site to play with at work when you feel like having a bit of a skive.

Friday, July 06, 2007

Smoothwall 3 Beta

I mentioned a while ago about there being a new version of the Linux firewall OS, Smoothwall. It is currently in beta, but I downloaded it this morning as I needed to put a quick none production use firewall in place.

The current stable release of version 2 wouldn't install on my test machine (a dell optiplex GX270), but the Beta of version 3 went on no problems. After swapping a network card in the pc that was faulty I could connect to the box.

The new interface is very slick, I like the new navigation system, very easy to find your way round and gives lots of information. All the network usage stats were very cool. You can now also update the snort rules from the browser without an add on. I pointed my browser at its proxy (i've never used it as a proxy server before, it runs on port 800) and I could surf no problem.
I couldn't find out if I could authenticate users on the proxy or not (we have been told we now have to log all internet traffic with a user name against it), but ill pose that question in the forums.

All in all I think the full release should be well worth the wait

Tuesday, July 03, 2007

Passing Optional Parameters To Stored Procedure

Found quite a cool thing recently, that means you can have optional parameters in a SQL stored procedure.
This means you can pass the options into the procedure if you have some, or if none are passed get the SP to use some defaults instead. It took a while to get the syntax correct, but its fairly straight forward, in this example we will use the year and month as optional parameters:

@year int = NULL, @month char(20) = NULL

if ISNULL (@year, 0) = 0
SELECT @month = DATENAME(month, GETDATE())

First of all we declare the 2 variables, then we check if the first one is NULL (nothing passed). If it is then we set both the month and year to be the current month and year. Simple but effective!

I have another article published at aspfree.com, this one is about creating a simple RSS feed using ASP.net, written in c#. Read it HERE

Wednesday, June 27, 2007

Another new Article

I have another article on AspFree.com, this one is on creating a PAC (Proxy Access Control) for use on you network. Read it here

Still on the Cisco ICND course, some of its interesting but I think 5 days is a bit of an overkill, we finished at half 3 today.
Its funny talking to other IT workers from different industries, you get to hear that all the same amusing helpdesk calls you receive are the same everywhere. I cant believe so many people cant remember there bloody names!

Monday, June 25, 2007

Subnet masks (oh what a joy)

This week i'm doing a Cisco CIND course. And on the first day, joy of joys i've been doing subnetting. For those who don't know this means working out the subnet masks and host address ranges for various numbers of subnets or hosts.
Its been a long time since I did any of this and it's no easer than the last time I did it. Why is it less complex to work it out using binary than doing it the easy way using decimals? I think I might just be scared of numbers bigger than 1!

Even though getting my head round some of the maths is tricky, I still think ill get a lot out of the course (most of the Microsoft ones I've done tend to be a bit lacking in practical information), but why is one of the first things the tutors ask is 'are you taking the exam?' Are they all on commission from the vendors? I've never seen the point in taking an exam that will be irrelevant or not recognised by anyone within a couple of years. I suppose it looks good on a cv, but I don't think it makes up for real world knowledge.

Thursday, June 21, 2007

New Beta of SmoothWall

There is a new Beta version of the OpenSource, Linux based firewall available now from http://smoothwall.org/.

I've been a user of SmoothWall for quite a few years, and this new update looks promising, as its still in beta i'm not really willing to blow my existing firewall away just yet, but ill definitely be upgrading when the production version is released.


A couple of days ago I wrote about Windows Live! writer, I decided to download it today and this post is being written from within it. It does look nicer than the last version, and its support for tags and images is a great improvement. Ill find out in a minute if the formatting stuffs up when I upload it to blogger, that was why I stopped using the last one.

Tuesday, June 19, 2007

New version of live writter

Don't know if you have ever used it, but Microsoft wrote a bit of software called Windows Live! Writer (why does half of the products they bring out have Live! in the title?). There's another version (beta 2) that's been released. Read more about it at http://jcheng.wordpress.com/2007/05/30/finally-writer-beta-2/

I did download the first one, it worked ok but lacked a couple of features, and when I uploaded the postings some of the formatting didn't look correct on Blogger. I might try the new one and see if its any better.

I have got another article up on AspFree.com, its about logging terminal server connections and you can read it in all its glory here

On a completely different topic, if you like a bit of English alt rock music, check out the Pigeon Detectives first album Wait For Me. It's rather good

Monday, June 18, 2007

Problem Starting the Exchange 2003 System Attendant

Had a very odd problem this morning with one of our mail servers, and the guy who normally fixes them is on holiday so it landed in my lap.

The server was rebooted yesterday due to 'problems' (no one could tell me what they were) , and when it came back up none of the exchange services would start, the first error in the system log was:

Error 7000
The Microsoft Exchange System Attendant service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

So another very useful Microsoft error to help me. I tried the obvious things like rebooting the global catalogue server, checked the size of the mail store etc but nothing was jumping out at me. The server hadn't had any patch's installed over the last week so I could rule that out.

I found a couple of web sites that said it might be a permissions problem in the registry, but that made no difference. I tried turning on more advanced logging options though the Exchange system manager but that didn't give me much extra info.

I then tried to start the system attendant not through the services, but by running the exe the serviced used, called mad.exe in the exchange\bin folder. Running this finally give me a clue as to what was wrong. I got an error saying it could not run due to address.dll being missing.

I found this file in a couple of places on the server, and tried re-registering it at first but to no avail. Then I copied it into the bin folder where the mad.exe was, and got no error! I then went back into services, and started all the exchange ones and they all came up fine, and users could get at there email again.

I have no idea why this happened, I dont see any reason for the file to be missing, and the fix was less than obvious

Anything Google can do, Microsoft can (try) and do better

I've just been having a play about with Windows live Maps (http://maps.live.com). At first look it does seem to have some pretty cool functions, such as the ability to install an activeX that gives you a 3D view, and you can rotate round it. This looks very good when viewing hills and large buildings

A lot of the images also seem to be of better quality than Google maps.

Problems do seem to happen when you start looking at different countries other than the US and the UK. I looked a the south of France and there wasn't even any house's being shown. So good features, but a long way to go yet if they want to challenge Google

Tuesday, June 12, 2007

Taking a Safari

Well I never thought I'd say this again, but I am quite impressed with Apples Safari browser running on Windows (download http://www.apple.com/safari/)

I am writing this post using it right now. It does appear to be far FAR faster than IE6, IE7 and Firefox.I've been to quite a few sites that might tax it, but so far it has performed very well.

It's not all good though, I can make it crash if I try to surf through a proxy that wants me to authenticate. It brings up the login prompt, I enter my details and hit ok but the browser just dies on me.

Also, I can't seam to get into the proxy settings in preferences/advanced. The change settings are greyed out. It looks like it's getting its proxy settings from whatever the default browser is set to.
So if I make Safari the default I can't surf. Plus I think it still might have a problem using an automatic config file (a .pac file). Old Macs used to have this problem (I think), I thought this might have been fixed.

Sunday, June 10, 2007

I'm now classed as a 'freelance' writter

Just a quick post to point you at my first ever article published at Aspfree.com, that right people are going to pay me to write articles for there web site. Read the first one at here

I've had a couple of ideas for other articles, if anyone out there has any ideas of things I can write about drop me an email. It doesn't mean ill be stopping writting on this blog, in fact it might mean I write on here more.

Just as another side note, I've started to watch Hero's, its a rather quality show that I suggest you check out

Tuesday, May 08, 2007

Resetting local Administrator account passwords

I have come across a very useful site that contains an iso to create a boot disk that will allow you to reset a local administrator password.
Check out http://home.eunet.no/~pnordahl/ntpasswd
It uses a version of Linux to boot the pc, mount the NTFS disk and edit the section of the machines registry to reset the password to whatever you need

This is very useful in cases where the machine has fallen out of your active directory or the domain admin accounts password is not cached so you can log it on.

Easy Way to build a blade

If you business is anything like ours, you'll have racks full of blade server to look after. When it comes to setting them up in can sometimes be a pain. Recently we have been building our dell poweredge 1855's by re-creating the mirror from an existing server:

  1. First thing, make sure you change the local admin password on the source sever if you dont know it already.
  2. Pull the second disk out of the source server (normally 0:1), this will break the mirror.
  3. Pull both disks out of the server you want to build. Put one of the disks into the source server so it re-builds the mirror.
  4. Turn off the destination server. On the destination server, put the disk from the source server into the first slot (normally 0:0)
  5. Boot the server, go into the bios. and turn off the network cards so it wont conflict with the existing server
  6. Once the os has loaded, login, delete any network teams you might have setup, re-name the server to its new name and pull it out of the domain. Reboot.
  7. Before the server reboots, go into its bios again and re-enable its network
  8. When the os has loaded, login (you'll have to go in as the local admin, I hope you changed the password!), re-create any network team you might have and re-join the domain
Once you have done this you should have a copy of the source server, easy! The main problem with doing this was to re-create the mirror on the destination server. Normally you'd just put the disk back in and it would re-create the mirror.

Problem is you cant just put it back in and it re-mirrors because its already got a signature from the previous server.
Sometimes as the server comes up it will recognize the new disk and re-create the mirror, but sometimes you have to go into the controller card (ctrl+m on the dell) and set the new disk to be the secondary, it will warn you its going to blow the old disk away but just ok it and it should re-sync the disks.

Sunday, April 22, 2007

Integration Heartache

Not really been learning to much new over the last couple of weeks. We have been moving the Isle of Mans system 'mainland' and integrating them into ours.
Found a useful feature of the SQL 2005 Enterprise manager though. We were doing a lot of dumping and loading databases, and wanted to write a SQL script that would do it, but couldn't find the correct syntax.
My boss then noticed that you can get Enterprise manager to 'script' certain tasks. Restoring a database was on of them. When you do the restore there is an option at the top left, it will save to a script what is currently set, or output it to a new window. Very Useful.

On another project I found out how to send optional parameters to a SQL stored procedure. When you declare the variables, make them = Null and you don't have to pass anything!

Friday, March 30, 2007

Memory Managment in SQL Server

For quite a while, we have had a problem with our main instance of SQL server not using all the memory available to it on the server. We have finally found out what the problem was thanks to this article - http://www.sql-server-performance.com/sql_server_performance_audit5.asp

The scenario is we have a clustered instance of SQL, that can run on one of 3 identically spec'd server running Windows2003 Enterprise, SQL 2000 Enterprise and with 16gig of ram.

The sqlsvr process had only been running at about 3gig of memory, and was causing us some performance issues on busy days. We had found some articles about changing boot.ini that told windows to use the extra memory, but it didn't seam to help. Here are the steps:

  1. Open up boot.ini (its normally hidden but lives in the root of c:\)
  2. At the end of the line for the OS you boot to, add /3GB /PAE. This basicly tells Windows 2003 that it and SQL server have access to more than 4gig of Ram, and they can use it
  3. Next you have to set the 'awe enable' option of SQL server to 1. This enables the API in SQL server and give it access to the extra memory
  4. Open up SQL query analyser, and type:
    sp_configure 'awe enabled', 1
    Reconfigure with overide
  5. When you have done this, restart the server. When you bring it back up, SQL server should have access to all the memory available in the system. You can now tell SQL server how much memory to use in the servers properties, but you now have to specify a a specific amount and not a range.
Also something else I found while doing this, the port that a clustered instance of SQL runs on is 1267, the port it runs on when not clustered is 1433.

Wednesday, March 21, 2007

Exchange and Patches equals much confusion

We had installed some patches last month on our Exchange 2003 server that had some undesired effects, and also mislead me when trying to fix another problem.

The issue with the patches was all to do with shared mailbox access. We have a number of sales teams that all share one email account. The idea being that if a couple of members are on holiday on a call etc, then rest of the team can still pick up the emails.

The new patches (i'm not sure exactly witch one) tightened up some of the security settings, and meant that any users who used the shared mailbox and did not have there own individual mail account were unable to send mail. They kept getting errors like 'Resource not found', and 'You don't have permission to send on behalf of this user'

The way round it was to create mailbox's for these people, but hide them in the global address list so they see no difference. Looks like Microsoft implemented this to crack down on people using Exchange without a valid CAL.(note to self, setup a mirror of all our system in order to test all patches!!)

At the same time this happened, we also started to get errors from a couple of our users when sending email out using SMTP in an application we wrote. There didn't seam to be any pattern as to what was happening as some people saw no problems. The error was:
'550 5.7.1 Cannot Relay for name@domain.com.

After much head scratching I finally realized that we had moved a couple of our terminal servers to our new subnet, and a quick check in Exchange system manager revealed that those subnets indeed weren't allowed to relay through the mail server. How easily we think something is a bigger problem than it actually is!

On another note I have had a play around with Flickr, the photo sharing site. I have to say i'm very impressed with what it can do. You can check out my one and only photo (so far) here http://www.flickr.com/photos/beakersoft. The most impressive aspect of it is the Geotagging, that lets you give a co-ordinate to where the pics were taken, then view them in Google earth or other mapping systems.

All I need now is a digital camera with a GPS device and i'm set!

Sunday, March 18, 2007

Adding Column headers to Reporting Services Matrix

Found out a very useful tip (thanks to Bob at Microsoft - http://blogs.msdn.com/bobmeyers/) that allows you to add a heading to a column in a SQL reporting services Matrix.

You simply need to add a new column group to the top of your Matrix, and set its expression to be something like 'DummyExpression', and make sure you omit the normal leading '=', like below:

Now, you can move the group to be the top one in the properties of the Matrix, and type in the text box what ever header you need.

Simple but effective, I didn't even realise you could put dummy data into an expression, I thought the IDE would kick it back

On an entirely different note, I was very excited(being the big geek I am) to discover today that Buffy the Vampire slayer season 8 is coming back in comic book form, and is written by no less than Joss Whedon himself!
Check it out at Dark Horse comics here http://www.darkhorse.com/
I cant wait till my next visit to the comic shop!

Listening to: Saves the Day, Stay what you are.

Tuesday, March 13, 2007

Code Project and VMware

Just a quick post to let you all know I have uploaded my first ever article to the code project website! You can find it at http://www.codeproject.com/useritems/SimplePop3Class.asp

There must be loads of people using that site, i've had over 60 views of it so far and its only been up there half an hour or so.

Been playing about with VMWare virtual server. I think we are going to move away from clustering technology's and start using this instead. The only problem I can see so far is you need quite a lot of disk space on the server to run all the virtual machines, but that is offset by its advantages.

You can get some software for it that will allow you to move the server from one physical device to another, with users on the server and they wont notice anything. Now thats the future!

Also looking more into sharepoint, I think i'm going to try and add the reports services modules into it and create a portal using it for our sales people to use. When I get it setup ill post my findings on here.

Tuesday, March 06, 2007

Invalid Charater Error in Web.config file

Had a bit of a problem that was quite easily solved today. I was trying to substitute a curency pound symbol for a euro symbol in a web application, so I decided to make it configurable in the web.config file.
When I added it in however, I kept getting an error saying:

There is an invalid character in the given encoding

If I took out the line, or replaced it with another string, it worked fine. Turned out it was the encoding set in the top of the web config file. I changed to to read:

xml version ="1.0" encoding="windows-1252"

And it started to work fine. Not sure what that encoding refers to, but ill find out. I know I should really get the currency symbol from the local of the machine, but I don't know how!

Monday, March 05, 2007

Windows Fax Server 32079 error

I've been setting up a Windows 2003 fax server client over the weekend, and kept getting a very strange error reported when I sent a fax using an application I had written.

If a sent a fax using the Windows fax console it would go through fine, but whenever I used my application the job would drop into the outbox, but straight away got deleted. I got an error 32079 in the Application log of the server, that told me

An error occurred while preparing to send the fax. The service will not attempt to resend the fax. Please close other applications before resending.

I hunted the net and couldn't find anything useful on this error, apart from make sure you have setup your dialing rules (witch I had). I then noticed that the jobs I had submitted had there phone number in a different format than the ones sent via the Fax Console.

It turned out that it was because I was appending the country code to the start of the job, that is why it was kicking it out. As soon as I removed this from the config file and it no longer started the fax number with the country code, it worked fine.

I am very confused by this, as the last one I setup seamed to need the country code (+44 for England) otherwise it refused to work. So, i'm still not to sure what the problem actually is but at least its working. The only difference between the servers is one's in England, and the new one is in the Republic of Ireland. Not sure what difference that would make.

Wednesday, February 28, 2007

The wonder of Patchs

Had a couple of problems with patches this week. The First was on a Windows2003 server that runs a Dcom based application. We put all the latest MS patches on last week, and for some reason it stopped working.
I re-built one from scratch today, trying to do the patches in batches, but surprise surprise I managed to install them all, and it worked fine!

The second problem I had was with one of my web based applications, and (I think) the patches that came out in January. Its an ASP.Net app written in VB.net. It uses the impersonation function so all users run as one user. This is done due it the application needing lots of file system access across Windows and Linux platforms.

Anyway, I installed the patches and all of a sudden the application could no longer see any remote unc paths. Every time it checked to make sure the unc was valid it failed, and took the path offline! As soon as I un-installed the batch of patches it started working again.
If anyone else has had this problem and sussed out what it is, let me know.

On another note, i've seen a lot about on the web about hacking PSP (Playstaion portable) consoles lately, and the on going battle between the hackers and Sony. Quite a good BBC artical about it is http://news.bbc.co.uk/1/hi/technology/6397797.stm

So for I've not tried 'downgrading' my PSP, cos if it goes wrong you can end up turning it into an expensive looking brick. I am very tempted to give it a go though. Does anyone know if what the hackers are doing is legal?

Got a new 80gig drive for my laptop today. Over the next few days i'm going to blow it away and get it duel booting between Windows XP and Linux. If I find out anything interesting ill post it here.

Listening To: New album by the Kaiser Chiefs. Can't make my mind up about it yet.

Friday, February 23, 2007

More on RSS

As i discussed in my last posting, I have been doing some work with exposing pages/websites as RSS feeds.

In order to get a website to show the RSS icon (in the URL bar in Firefox, or to activate the feed option in IE7), you need to add the following code to the head tag in the web page:

link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/RSSFeed.rss"

You can also download all the RSS icons from www.feedicons.com if you want to add any manual links to your pages.

Friday, February 16, 2007

Exposing Data as RSS feed

I blogged a week or so about wanting to create an RSS feed using Asp.Net from some stories we hold in a database. Well, today cos i'm off for a week and couldn't be bothered doing anything else I had a play about with it and managed to get it working.

I downloaded the example that's part of the Microsoft artical as a starting point (its here:http://msdn2.microsoft.com/en-us/library/aa478968.aspx.). My first problem was the example is written in c#, and i've never used that before. Still I rolled up my sleeves and had a go.

The first thing I had to do was alter the SQL it was running, and the database it connected to. So I altered that in the code behind file and ran the page up expecting to be presented with a nice XML file. Of course it didn't work like that!

I was presented with one of the famous .net error pages, telling me that the Codebehind property of the page directive at the top of the page was no longer supported. I had a surf around and found that it was no longer supported in .Net2.0. I had to use the CodeFile and Inherits directive. So that page directive as a whole looked like this:

<%@ Page CodeFile="rss.aspx.cs" language="c#" ContentType="text/xml" AutoEventWireup="false" Inherits="SyndicationDemo.rss"%>

Once I did that, I started getting another error. This time it was down to me not being able to connect to the database. I checked my connection string and it looked ok. I then noticed there was a red error underline in the server name. The server was an instance so it was like news-db\newsdatabase. I remembered back to my limited C++ knowledge about escape character's, and that a forward slash was used to denote one. Once I put 2 forward slashes in, it started working!

I could now browse to the site, and out came my xml. Needles to say, I was most impressed. Before trying this I'd never programmed in C#, used a data repeater control or output a page in anything but html.

I still have some work to do on the project though. Sometimes there are characters in the story filed that the XML cant handle, I need to strip these out. I need to make it do something in case the page can't connect to the database or gets an error back when retrieving data. I also want to add one of those RSS icons to the normal PA web application, like the ones that appear in the address bar of other sites. When I get these working ill post anything useful here.

Anyway, I'm of to the dog racing now, hope I done lose to much money.

Listening To: Oasis, Definitely Maybe. What a suburb album, when you don't hear it for a while you forget how good it is.

Tuesday, February 13, 2007

Remote Access to Dell server

Just a quick post that might be of interest to anyone using Dell PowerEdge servers.

You might have noticed that quite a few of the rack mounted and stand alone models come with an extra ethernet port, with a spanner icon above them.
We had noticed these ages ago, but never really paid them much attention. We have recently started to look at them, and they are very useful indeed.

They have various name (ERA, DRAC, RAC) but basicly they give you bios level access to the machine, even when the OS has hung/crashed and you cant use normal remote access tools like VNC and Microsoft's in built remote desktop (when using remote desktop use a /console switch on windows 2003 to get to the servers console session).

You assign the RAC card an IP address (you can do this in the dell server assistant or when the servers booting), then connect to the ip address in a browser and you get low level access to reboot the server, power cycle it, turn it off etc without ever getting in the car and driving to the site!

It will also give you some server logs and other config options. The remote access tab should let you actually control the pc (even the POST screens) over a VNC like connection, but this doesn't always seam to work very well. Hopefully a new revision of the firmware will fix that.

Thursday, February 08, 2007

Time to Learn

Not very much to post at the moment. In the middle of doing a big change to the infrastructure at work. We are moving to a completely new subnet range. Not very complex but taking a lot of planning.

Programming wise started to play about with the asp.net Ajax extensions. Get more info on them here at www.asp.net. The Ajax idea has been around for a while, it just takes existing technology (Java and xml) and puts them in a nice easy to use package. You can now develop very interactive web based applications very quickly. One you get your head round how it all works!!

Also looking at creating an rss feed using asp.net. Our newspaper is trying to get more into the 'digital' age, so are throwing around words like rss and pretending they've been using it for ages. I'm trying to create an rss feed from the PA (press association) stories we get. I might get some brownie points for it and its quite interesting. A walk though of creating one is at http://msdn2.microsoft.com/en-us/library/aa478968.aspx.

When I get more into both of these things ill post anything interesting on here

Listening to: Little man Tate. Very good and not played enough on the radio. Far better than the View who are getting raved about far to much

Tuesday, January 30, 2007

Random Broadband Disconects

I had a problem where for no good reason I could see, my smoothwall firewall would keep disconnecting me from the Internet. If I rebooted the pc it would start to work fine for a while, but would eventually do it again.

I trawled though the logs (no mean feat considering i'm a windows user, and hardly know Linux at all!), and managed to sus out it was something wrong hardware wise with my usb modem, or my isp was having problems.

When I left my PC plugged straight into the modem, I had no problems. So I was going to try and replace the usb card in the pc. Before I did that I thought it might possibly be a power issue (the pc that runs the firewall is quite old and only has an atx mini power supply), so I bought a cheap powered usb hub to run the modem of to see if that helped.

Well, it did! I've ran the firewall up for nearly 2 days now and not one disconnect. This might mean my firewall hardware is on its way out, but at least I solved my problem short term!

More info on smoothwall can be found at www.smoothwall.org

Tuesday, January 16, 2007

Problem Assigning Software to Computers Via Group Policy

I've today managed to find the solution to a problems that's been bugging me for a bit. When trying to install software(an .msi file) via a computer group policy, I couldn't get it to work. In the application event log I was getting errors along the lines of

The installation source is invalid

As far as I could see I had given the computer NTFS rights into the share where the software was located, and everyone had read access to the share.

While trying to install the Dell open manage client software today I worked out what it was. Our Active directory is based on Windows 2000 servers, but the unc share the software was located on was a Windows2003 server. I moved the installation source to a windows 2000 server, gave the Domain Computers group access to the files and it worked!

Not entirely sure what caused the problem in the first place, there must be some incompatibility between the 2 operating systems way of working with the NTFS permissions.

So I managed to get the software on, but I cant get the client pc's to report properly to the Dell open manage IT assistant, without lots of manual intervention on the pc's.
You need to create a new domain user and run the IAP service as this users so the client will report. If anyone has done this already with some sort of script, let me know how you did it.

Listening to: NoFx, Punk In Drublic

Wednesday, January 10, 2007

DFS Problem Moving Domain Controler

Had a very odd problem this week, i'm sure it must have happened to someone before.
We moved an 2k active directory domain controller from one (logical) site to another. This had the very strange knock on effect of causing the domain DFS (distributed file system) to start acting strangely.

First of all, some machines (XPsp1, XPsp2, 2003 server) could not access the DFS root at all. They got a error message along the lines of:

'Configuration information could not be read from the domain controller'

Then some machines could see the DFS root, but some of the shares where missing. I tried re-creating the shares but this had no effect.

I then rebooted the Domain controller that was the PDC emulator and that did nothing. There wasn't anything suspect I could see in any of the FRS logs, so as a stab in the dark I restarted the DFS service (I didn't even realise there was one!) on all the domain controllers in the domain, and it worked!
I have know idea why this happened and cant find anything online as to what caused it, so anyone with any ideas let me know.

Also installed MS Sharepoint 3.0 this week. Looks quite funky not really done much with it yet. If i find out anything that might be of interest ill post it here.

Oh, and check out the new Apple iPhone here www.apple.com/iphone I know some smart phones will do similar things already, but this does look mighty cool.

Monday, January 01, 2007

Convert First letters to uppercase .Net

First of all happy new year to everyone. Probably like most people I started the year with a hangover. Not helped by the fact I had to get up at half 8 to take my girlfriend to work!

Just a quick post for something useful I found, I wanted to change a name (ie joe bloggs) so that the first letters would be upper case. I found the VbStrConv class. It contains lots of good methods for string manipulation.
The one I needed was VbStrConv.ProperCase

Dim strNameAs String = "joe bloggs"
strNameAs = StrConv(strNameAs , VbStrConv.ProperCase)