Wednesday, June 06, 2007

VS2005 Project Templates Failing

I came across a problem recently where I went to create a standard Console Application project in Visual Studio 2005 and to my alarm I got a message saying

 

---------------------------
Microsoft Visual Studio
---------------------------
Could not find file 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplatesCache\CSharp\Windows\1033\ConsoleApplication.zip\ConsooleApplication.csproj'

---------------------------
OK
---------------------------

 

This took me back a bit, as creating a Console application is one of the most basic tasks you would ever want to do in Visual Studio 2005. my next thought (after trying exactly the same thing 5 or 6 times) was to run visual studio with elevated priviledges, but alas this still didn't fix the problem. I checked and sure enough I could still create a Windows application no problems (with or without elevating my priviledges), so I just put it down to some kind of vista weirdness and continued on (using Winforms apps instead of console apps whenever I wanted to create a quick test). Today, however, I discovered that I could no longer create Web Service Applications as they crashed with a very similar error, and with a presentation on setting up your development environment on Windows Vista looming, I decided that I had better get to the bottom of the problem.... and so I did.

 

It turned out to be the Guidance Automation Toolkit and Guidance Automation Extensions packages I recently installed that for some reason had done some damage to the Project Template System in Visual Studio. now I guess fair is fair, both of these packages are in beta, and there are some known issues around running them on Vista (unfortunately I was not aware of these issues at install time). One of the big issues with the Guidance Automation Extensions is around uninstalling it. You get so far, and then a dialog pops up, no title, no message, just an OK button, and it stops uninstalling. fortunately I found a blog post by one Greg Duncan on how to uninstall the Guidance Automation Extensions.

 

I can now happily create console and web service applications again, but more importantly stand up in front of the Victoria .Net SIG next tuesday and talk confidently about running Visual Studio 2005 on Vista.

Tuesday, June 05, 2007

Speaking at Victoria .Net SIG

Just a quick note to say that I'll be speaking at the next Victoria.Net SIG meeting on the 12th of June at Microsoft building, Level 5, 4 Freshwater Place, Southbank. Turn up for Pizza and soft drink at 5:30 pm.

 

The topic of my discussion will be setting up your development environment on Windows Vista. Hope to see you there.

Thursday, May 03, 2007

IT a series of stops and starts

Is it just me, or does anyone else in the industry feel that working in the IT industry is a series of stops and starts. What I mean by this is that often when i start on something that I think is going to (or at least should be) faily straight forward, quite often, very early on in the peice I come across a problem that consumes way more time than I'd expected. For example, today, I was asked to fix a bug that was occuring on a project that I was involved with no less than a few weeks ago. I know the codebase had changed significantly, as a merge with the main branch had been done. What I didn't expect was that I'd spend the first 3 and a half hours tryng to get my machine to a point where I could compile and then run the project. Now part of the problem was my grappling with the back up and restore features of SQL Server, and one could argue that I potentially should understand that better (and now do), but the rest of the time was grappling with issues that we have been having with bugs inTFS that cause issues when trying to Get the latest versin of all files in large projects. Then there are aother times like right now where I am trying to do a few things on my PC, and even though I have a fairly new DELL D820 laptop with 2GB of RAM, and 4GB of ready boost, the hard drive is churning continuously (not sure why), and it takes up to 10 seconds to switch between tasks. This may have something to do with the fact that about 20 minutes ago I had to actually reset my computer after it crashed while trying to use Explorer. I am fast approaching "a sad realisation" that although windows Vista may be more secure, it is not in any way speedy, or stable. I really think Microsoft rushed it out the door, and that the end user is paying the price. It's times like these when I start to think about work in other sectors, hmmmm.... maybe I'll start up a Tango dance studio.

Sunday, April 22, 2007

Tango performance

Just to show how behind the times I am, here is my first ever appearance on You Tube. This is a Tango performance Niki and I did last weekend at our friend Yeow's birthday party. Niki and I have been dancing Argentinean Tango for 6 years now, and it is becoming an all consuming passion.

 

 

Technorati tags:

Wednesday, April 18, 2007

It's had its fair chance, time to switch back

That's it I've had it with IE7, I used to use firefox for the vast amount of my work until IE7 came out, and in the spirit of giving IE7 a fair trial, I decided to use it as my default browser. I started this back when I was still running Windows XP, and I was then using IE7 Beta 2, and the odd crash was acceptable for a beta product. I liked the tabbed browsing, and thought theat they actually did some things slightly better than firefox. I was impressed with the efforts made in standards support, and for this reason, I had persisted with it, even though the rendering engine is significantly slower (up to 5 times slower in some cases). When I started running Visat in november last year, I noticed that from time to time IE would crash (even though it was now out of beta), but I thought "patience... Microsoft are fairly good at stabilizing their products.... eventually, and the release of Vista was a rather rushed one, just so they could get it out the door before the end of the year, so I can expect that there may be some bugs that they find and fix along the way". Well, it's now mid April, and Internet Explorer is still crashing quite frequently, and today as I was browsing some Micosoft web sites, it crashed again. This is the final straw, I think they've had long enough to fix these problems. I've just switched back to firefox as my default browser.

Monday, April 16, 2007

Blog posts as an indication of my state of mind

When I started blogging way back at the start of 2004 (see http://scottbaldwin.blogspot.com/2004_03_01_archive.html, (I'd like to say before blogging became popular, but that would definitely be a lie) I was in a very stressful job that I didn't really enjoy, it was taking up far too much of my time, and was making me feel quite frustrated with the IT industry to the point where I was almost ready to leave the field for good. So even though I found out about blogging through my work in the IT field, the first blog I started was nothing to do with IT at all, in fact musings of a morbid mind was where I intended to post all of my political rantings and ravings, my general thoughts on topics (generally outside of IT), family and travel photos etc... , and just a general writing exersize for me. I started my geek blod Daily Dribblings of a Demented Developer shortly after (May 2004), but it was always the poor cousin of my musings (btw no prizes for guessig that alliteration is one of my favourite literary devices). I started work for Readify at the start of 2005, and since then, my writings on my Geek blog have steadily increased, and my writings on my musings blog have decreased, to the point where I noticed today that my geek blog has almost caught up, and what's more surprising the blog articles I've got in the pipeline are almost ALL for my Geek blog.

Its amazing the amount of difference working for a good company can make, there are still aspects of the IT industry I'm not enraptured about, and I still get stressed from time to time when things don't work the way I expect them to, but I have come to realise that there is a lot I do enjoy about IT.

Sunday, March 25, 2007

Fixing the WCF - SSIS Web Service Task problem the easy way.

Literally minutes after publishing my post on calling a WCF Web Service from the SSIS Web Service task, I checked back with the forum post that I'd mentioned in that blogpost http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1023821&SiteID=17 only to discover that Uwe Heinkel had given me the peice of information I was missing in the first place. So the crux is I don't have to hand craft the dtsx xml file to get it to play ball.

 

I simply remove the following line from the wsdl file

<xsd:import schemaLocation="http://localhost:50344/MyWebService/Service.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/"/>

 and it all just works as expected.

 

damn.... I was having soooo much fun wading around in the dtsx xml file.

Calling a WCF Web Service from the SSIS Web Service Task

I have recently been doing some work using SSIS, and this is really the first time I've used for anything serious (ie beyond doing the tutorials that come with SQL Server 2005). I have also recently been learning WCF and as we needed to create some Web Services to deliver the information to SSIS, I decided that this would be the perfect opportunity to put my newly acquired WCF skills to good use. Now I always like to start things out very simply, which in this case meant prototyping the SSIS Web Service Task with the most basic of WCF Web Services I could possibly create, thinking once I get this working, I can then move on to the actual task that I want to achieve with confidence... unfortunately this is where my whole plan started to unravel. For those following at home, here are the steps I took.

1. Create a new WCF Web Service in Visual Studio 2005 by selecting File->New->Web Site, then choosing a WCF Web Service. (Note .Net 3.0 and related Visual Studio extensions are required for this. Also choosing a File based or IIS based web service shouldn't matter).

2. Open the web.config file change the binding to basicHttpBinding (although the same end result is still achieved with the default wsHttpBinding).

3. Expose the metadata over httpget by adding the following line to the service behavior in the config fil

<serviceMetadata httpGetEnabled="true" />

4. run the service.

5. Create a new SSIS project in Visual Studio by selecting File->New->Project, then choosing Business Intelligence->Integration Services from the menu.

6. Add an http connection that points to the wsdl file for your service, and a Web Service Task to the Control Flow that uses the http connection.

7. Edit the Web Service Task, and download the wsdl exposed by your service, and save it locally to a file by using the OverwriteWSDLFile = true on the General page.

8. Select Input, and then select 'MyService' from the drop down.

 

At this point I recieved an error message.

 

Item has already been added. Key in Dictionary: ‘DataContract1’ key being added : ‘DataContract1’

It then would NOT populate the Method DropDown, so I was unable to select a Service Method to call, and because you are confined to selecting from the drop down, there is no possible way to make any of the Web Service method calls.

 

Now I'm the superstitious kind when it comes to writing software, my firm belief is that if you can't get the most basics Web Service working, then you may as well not try to get your complex web service that wants to pass around meaningful data, working, you'll end up in tears.

A google search on the problem yielded the following forum post http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1023821&SiteID=17 which was helpful in revealing the underlying problem. The problem is with the generated wsdl and corresponding schemas, not sure exactly what is wrong with them, but for some reason, the UI in Visual Studio doesn't like the way WCF publishes its metadata, in particular the way it published metadata about its DataContracts (complex types). So I thought I'd make the default WebService that WCF generates even simpler by removing any trace of the DataContract. This worked fine, I could call a WCF WebService from within SSIS no problems... with the restriction that I could only pass primitive types to/from the web service. now this might be fine for your purposes, but I required something a little more powerful, so I decided to persist with figuring out the solution.

 

I tried a number of things with the generated schemas, but I think in the end I'd exhausted my limited understanding of wsdl and xsd, and was no further ahead. Next I remembered a very simple statement by a fellow collegue of mine Andrew Ball who was at the time giving me some SSIS advice. He said "... under the hood an SSIS package (dtsx file) is just a big xml file". Armed with this I began to see the issue as more of a tooling issue, and thought that maybe the issue is purely with the designer. So I cracked open a sample that Andrew had sent me and found where the various Web Service properties were being set. I also cracked open good old reflector and took a look at the way in which Complex Types were handled in the Microsoft.SqlServer.WebServiceTask.dll Which is responsible for the Web Service Task in SSIS. about half an hour later (give or take 10 mins) I had the following XML

<WSTask:MethodInfo WSTask:MethodName="MyOperation2" WSTask:MessageName="">

<WSTask:Documentation>

Basic Hello world service call that uses a DataContract

</WSTask:Documentation>

<WSTask:ParamInfo WSTask:Name="dataContractValue" WSTask:Datatype="DataContract1" WSTask:ParamType="Complex" WSTask:SeqNumber="0">

<WSTask:ComplexValue>

<WSTask:ComplexProperty WSTask:Name="FirstName" WSTask:Datatype="string" WSTask:ParamType="Primitive">

<WSTask:PrimitiveValue>Scott</WSTask:PrimitiveValue>

</WSTask:ComplexProperty WSTask:Name>

<WSTask:ComplexProperty WSTask:Name="LastName" WSTask:Datatype="string" WSTask:ParamType="Primitive">

<WSTask:PrimitiveValue>Baldwin</WSTask:PrimitiveValue>

</WSTask:ComplexProperty WSTask:Name>

</WSTask:ComplexValue>

</WSTask:ParamInfo>

 

Which when placed inside a web service task element, can be used to successfully call the web service with the DataContract.

 

So my conclusion is that there is a bug in the SSIS Web Service task UI that doesn't handle populatinf the Method drop down correctly (I'd trust WCF before I'd trust SSIS), but this is merely a bug with the UI, not with the way in which the Web Service task actually goes about calling the web service.

 

 

Added after post (literally minutes after): For the easy way to solve this problem see http://sjbdeveloper.blogspot.com/2007/03/fixing-wcf-ssis-web-service-task.html

Thursday, March 01, 2007

Flickr becomes alive

Just found a really neat Plugin for Windows live writer called flickr4writer that allows you to add images from your Flickr photos by simply clicking "Insert->Flickr image...", so to celebrate here is one of my flickr photos.

 

Pose #6

Tuesday, February 27, 2007

Molly helps Microsoft with Standards

This is huge... I've been up against some major deadlines so I haven't been keeping up with all my blog reading, but today I decided that before I go home I was just going to catch up on a few of the more important ones, and so I was reading the IEBlog when I stubled across this article, the basic crux of which is that Molly E. Holzschlag has "signed on with the Internet Explorer team on a contract basis to work on standards and interoperability issues".

 

I have actually heard Molly speak at the Web Directions South conference last year, and she is a really inspiring speaker, and someone who tirelessly advocates for better adoption of Web Standards. It'll be interesting to follow her progress at The Daily Molly.

Saturday, February 03, 2007

Published articles for The Readify Tech news letter

Just thought I'd mention that I now have a published two part article on the Readify tech news letter on SQL Server Express Edition.

 

You can view the articles at

SQL Server Express (Part One) - Another reason to move your user applications onto a stable platform

and

SQL Server Express (Part Two) - How User Instances Work

It finally dawned on me why I don't like the name "ASP.Net AJAX"

Microsoft renamed their AJAX offering from ATLAS to ASP.Net Ajax around November last year. Now I personally never quite understood what was so bad about ATLAS, but I do realize that as a general rule, product code names generally have to change at some point before the release to the main stream, (Longhorn -> Vista, etc...), but I must confess that quite often Microsoft completely screw it up.

 

I guess there is significant pressure from various departments, notably marketing and branding who want to maintain a consistent theme, and have the morbid fascination with trying to imbibe descriptive meaning into product names, and also from the legal department who are desperately trying to avoid trademark infringements. This is why I didn't blog about the name change when I first learned of it, but I always felt a huge sense of disappointment about the change, but couldn't quite put my finger on why I was so disappointed... until this week.

 

Beyond the obvious lack of imagination displayed taking the two core technologies (ASP.Net and AJAX), and just combining them (which in itself causes some confusion), I realised something this week when I was attempting to debug an issue with the library. As a developer one of our most important tools is our favourite Internet search engine. Whenever we come across a problem say with a CSS styling that isn't displaying correctly in a browser we just go to our favourite search engine and type in a question, for example "CSS min-width Internet Explorer". In Google the first page of the previous search returns all types of useful hits, including information regarding the fact that min-width is not supported in Internet Explorer 6.0 and a number of ways you can work around this. This is very powerful and allows us to do our jobs a lot quicker.

 

I discovered when trying to debug a problem with ASP.Net AJAX that this using ASP.Net and AJAX is not only longer to type than ATLAS, but returns all kinds of results that you wouldn't really be interested in. If you just type in ASP.Net AJAX into Google, the first page returns (as you'd expect), the official home page (ajax.asp.net), and a few other relevant topics, but then it starts to get more off-topic, like other component vendors offering AJAX style controls in ASP.Net such as ajaxium, ajaxpro, etc..., this is then further confounded if you need more search terms. The search is helped marginally by quoting "ASP.Net AJAX", but still returns that ajaxium website in the first page of results.

 

If Microsoft had've done what the trend is in the rest of the industry and actually used some imagination to come up with a short sharp name that was unique in the industry space, it could've made all our lives a little bit easier.

Friday, February 02, 2007

Dell Quickset disabling Internal network card

I had an interesting network problem today. I arrived at work, plugged my laptop into the power, and then into the network cable, switched it on only to find that I had no network connectivity. After rebooting twice, and discussing it with my colleague sitting next to me who has pretty much an identical laptop, connected to the same router, with no such networking problems, I did a bit of poking around.

I have a latitude D820 running Windows Vista, and the Dell Quickset power utility. One feature of quickset is that it disables the internal network card if you are not using it and you are on battery power, to get a few more minutes of battery life. It turns out that it must be a bit buggy as this turned out to be my problem. It had disabled my network card from the night before, and admittedly I had suspended my session, but then this morning, even after plugging into the power at work, and after rebooting my system twice, my network card still failed to respond. I fixed it by explicitly setting in the quickset UI to "always activate on battery".

Tuesday, January 16, 2007

IE Developer toolbar rocks

Just downloaded the latest beta of the IE Developer toolbar, and I must say it seriously rocks....

 

I've been using previous versions for a while now, and have found it extremely helpful in debugging styling problems, but this version goes to the next level. I haven't had a good chance to put it through it's paces yet, but I'm sure the "Style Trace" functionality will prove indispensable. It'll be interesting to see what will be in the final version of this product, they may even start to challenge firefox as the "Developers preferred browser", although I think they still have a way to go there.

Web Directions North gets the nod of approval from Microsoft Luminaries

Just read a post on PeterL's blog, about Web Directions North. I went to the Web Directions South conference myself. Here's my wrap up of the Aussie version, although I must admit that my post doesn't do it justice, the event is well worth attending, and will challenge the way you think about the web.

 

Warning: if you do anything of note during a session, you'll probably see yourself used as an example of the power of web 2.0 as the speaker pulls down the flickr image of you minutes after the event.

 

tags:

Friday, December 22, 2006

Back and Live

After much frustration with Windows Live Writer (Beta) and Blogger (Beta) having communications issues, I am now back blogging with Windows Live Writer.

 

Gotta love trying to get two beta products communicating.

 

 

Technorati tags: ,

Monday, December 04, 2006

As Kermit would say ... "It's not easy being Green"

A fellow collegue of mine Darren Neimke has posted a rather interesting post on his blog, which has got me thinking. Now I have to admit, I do consider myself to be a "Greenie", however, far from having "jumped on the bandwagon, I have been a member of The Australian Greens now for well over 3 years, and in fact I can trace my pilgramage from the high slopes of comfortable numbness about environmental issues into the radical valley of the shadow of Greenie Activism to a course I took back at uni, almost 11 years ago. A philosophy course aimed at Engineers called Technology and Human Values in which we studied "systems engineering" approaches to the ways technologies are used and abused both here and in developing countries.

Anyway, my main reason for writing this blog article is to suggest to Darren, that I feel has has understated some of the issues slightly. I am ussuming that some of the understatements were intentional and for effect like " .... Or some ice melting in Antarctica." trivialising the disapearance of entire glaciers, however, I the one I really want to concerntrate on is the issue of research and the problems of people reading something and just believing it. From his post

Research is a skill that is being diminished by the one-click world of Google and the new media. People hear something and believe it to be true without even having the faintest clue of how they would ratify such assertions.

I think in this statement are a number of problems all rolled into one.
Firstly, yes we live in a society based on instant gratification. Google is a great tool, that can be used to justify any point of view you want to throw at it.
Secondly, I think it is quite difficult to "ratify" certain facts. The problem comes from the nature of the beast that is science. To really fully understand the latest scientific findings, requires you to pretty much be at the forefront of scientific reseach in that particular area, and this requires not only having a PHD, but being actively involved in hands on research. The problem is that even scientists at this level can't always seem to agree, and the way in which research projects get funding often requires researchers to make bold (sometimes even rediculous) statements to gain the attention of the various institutions that are willing to put up the money to fund this research. How is your average punter expected to be able to know what the truth is even if they have tracked down the information from people considered leaders in their field.

Not wanting to be all doom and gloom, I think that there are solutions emerging to these problems.

If I may use a buzz-word, with the web 2.0 paradigm, we are starting to understand the "wisdom of the crowd", in fact google has used this in its search algorithms for a while, but there are even more powerful tools that enable collaboration on an unprecidented scale, sites such as wikipedia are classic examples of this.

With respects to the scientific community, by its very nature, it is a dynamic exchange of ideas and theories. unlike other debates we encounter, such as religion, politics etc... there are not the same intitutionalised barriers to callenging the status quo. If a scientist or group of scientists have a theory, this will be critiqued by many other scientists who will then be able to repeat either the same experiment and validate the findings, or disprove them. Even if a scientist or group of scientist start to hold some political sway, and spread inaccurate theories for a time, eventually someone will be able to challenge the theory, and a better theory will prevail.

So where does that leave us with the environment debate. Well, my personal feeling is that the premise that us 6 billion humans are having a noticable impact on the world we live in has been kicking around for long enough now, and the vast majority of scientists who are working in the field seem to agree on some of the big ticket items that constitute climate change. What the results might be are admitedly speculation. Educated speculation, but speculation none the less. However, I think that we can no longer use the ignorance is bliss approach to keeping the status quo. We have to realise that systematic change is essential if we as a species want to continue to maintain the quality of life that we currently do. Even more so if we want to take any significant amount of non-human species into future. This then becomes a battle that sometimes needs to be fought on a political level, and sometimes on a personal level. So Darren, next time I'm bending your ear about how stupid it is to be logging our water catchments for wood chips in the middle of a drought, and you slip seemlessly into that glazed over look, at least you'll know where I'm comming from.

Sunday, December 03, 2006

Technorati and claiming your blog

I started playing around with Technorati the other day and decided to "Claim my blogs", just to see if anyone else was linking to me. I have two blogs, this one which is my geek blog, and another one that I reserve for my thoughts on politics/art/etc... anything that's not technology related. To my surprise I found quite a few people link to this blog, but to mt disappointment, found that I had absolutely NO links to my other blog. I guess that's no surprise really considering I have never been really active in promoting my other blog. So I thought I'd actually attempt to add some technorati goodness by putting in a shameless plug on my popular blog for my less popular blog.

Musings of a Morbid Mind.

No prizes for guessing that aliteration is one of my favourite literary devices.

Saturday, October 28, 2006

Development V's Production Environment

An interesting post on software environmental issues by Mitch Denny caught my attention today, not only because he sent a link around on our internal tech list, but because it's something that I think continually trips up a lot of developers (myself included). Mitch basically argues (and I agree) that development should be done in the same basic environment as the production system, he plays this off against infrastructure people who tend to want to keep a gap between production and development for safety reasons, I mean wo knows what wholes these crazy developers are going to poke in our top-notch security infrastructure.

Most of my experience has been in the shrink wrapped software industry ans as such, there is little point trying to match development and production environments, so in this case I suggest develop on the environment that makes the developers most productive, but then make sure you test, using whatever virtualisation technology you prefer, on ALL platforms in your supported platform matrix.

With enterprise development however, I would say that one should develop in an environment as close as is practicable to the production environment. It never ceases to amaze me the amount of problems that arise because of differences between the development and production environments. Have you ever heard a developer say "gee, it doesn't do that on my machine". The closer you make development environments to the production environment, the less you'll hear this anoying phrase.

The flip side of the coin is that developers need to understand fairly well the differences between their development environment and their production environment. One thing that has bitten me in the past, and a lot of other developers as well is the difference between IIS and the Visual Studio Development Web Server (The web server formerly known as Cassini). There are a number of differneces, and also a number of reasons that developers like to use it over IIS. One major difference which always seems to trip me up is that Cassini passes every requested file through the ASP.Net pipeline, as opposed to IIS which will serve a lot of files normally (ie *.css, *.jpg, *.gif, *.png, *.html, etc...), and only pass the ASP.Net specific files (*.aspx, *.asmx, *.ashx etc...) through to the ASP.Net pipeline. When you first start a project you don't really notice any difference until you think to yourself, "gee, it would be nice to add forms authentication now", and so you put in the standard <deny user="?" /> element and all of a sudden your login page has no graphics and doesn't look anything like how you designed it. This is because Cassini is sending all of you image and css files through the ASP.Net pipeline and they are getting blocked by the Security module because you are not authenticated... yet.

Tags: ASP.Net, IIS

Friday, October 13, 2006

Visual Studio 2005 misbehaving after Automatic updates

I have spent the morning struggling with Visual Studio. It has been crashing non-stop, but I have got to the bottom of the problem, and am happy to share with the rest of the world.

Visual Studio was happily starting and loading my solution, but whenever I clicked on the test menu and attempted to do something like open the TestView window, VS was crashing. If I tried to open a localtestrun.testrunconfig file it would crash with the following error "Could not open assembly System.Data version 2.0.0.0 .... The system cannot find specified path".

I won't bore you with the process I had to go through to find the resolution, but the problem turned out to be that this morning My machine installed some updates from Windows Automatic Updates. Most of these updates were succesful, but one of them, namely "Security Update for Microsoft .NET Framework, Version 2.0 (KB922770)" had failed with the following error "Error Code: 0x643". after doing a search on this particular error I found the following article http://support.microsoft.com/kb/923100. However, I did not need to follow the resolution outlined there, I simply went to the Windows Update site and manually installed the update.

I hope this helps someone out before they have to spend half a day like I did trying to track it down.