Defragmenting my MacBook – using iDefrag to solve Boot Camp errors

Since Wednesday was annoying-Vista-feature-day, I thought today I should focus on a very annoying OSX feature, or should I say lack thereof.
If you’ve spent much time on one of the latest Macbooks, you may have noticed that OSX doesn’t provide a way to defragment the hard drive. When I first discovered this, I thought I was surely mistaken. Think again, Aaron. This is Apple you’re talking about. I guess I’m just spoiled by Window’s quest for all things practical.
Apparently, in Apple’s ongoing (and sometimes silly) quest for simplicity, they designed OSX to handle it for you behind the scenes. For most home users, that’s probably ok, but when you need specific control over your drive usage and the OSX algorithm isn’t doing things the way you need it to you’re simply out of luck, unless of course you’re willing to break out the wallet. Most devs will run into this at some point.
The place I’ve seen this bite people the most, including myself, is when using Apple’s Boot Camp— their drive partitioning software that makes it easy to dual-boot so you can run XP/Vista on your MacBook Intel-hardware. However, if your drive is seriously fragmented or simply not compact enough, Boot Camp will often fail when you ask it to create the Windows partition, complaining that “some files cannot be moved”. In my case, I was only using 20 GB for OSX and had 90 GB of disk space freeyet when I asked Boot Camp to create a 50 GB partition, it failed with that error. Again, what really sucks is that there is no way to diagnose or solve the problem using OSX provided tools. I had to resort to a 3rd party. Enter iDefrag.
So I downloaded the iDefrag trial and scanned my drive. I noticed a huge file (~2 GB, which happened to be the swap file) in the second half of the physical drive space, so if OSX was unable to move that file, that explains why my 50 GB partition failed in Boot Camp. You can’t do much beyond a scan with iDefrag until you purchase it, so purchase it I did ($30). Then I created an iDefrag boot disk (using the CD creator software they provide), booted to the CD, and ran iDefrag (this is necessary because you cannot boot from the HD you wish to defragment, unless you use the simple/quick defragment algorithm, but that wouldn’t have done what I needed here). Then I ran the compact algorithm to move everything to the front of the drive.
Once it finished, I rebooted to my HD and ran Boot Camp Assistant once again, and voila, it created the large partition no problem. In fact, I decided to dedicate 70 GB to my Vista partition since I’m spend more time there these days and it worked without a hitch.
In the end, I spent a bunch of time researching the issue, trying to figure out a built-in solution to no avail — what a waste of time. So my advice to those experiencing this problem: don’t waste time, spend the $30 and buy iDefrag or something like it. I personally found iDefrag to be a great product with great visuals:
Disclaimer: I have no affiliation with iDefrag, it’s authors, or the co. I simply found them on Google.
There were a few forums that helped me survey the scene and offered other possible solutions, but in the end, the only deterministic solution is to defragment/compact the drive, and Apple doesn’t provide it.
This is probably my #1 complaint with Apple as a developer — they simply don’t provide the necessary system tools that serious developers need to operate on a daily basis. Instead we have to buy them individually, which gets tiring after a while. And if you can’t cater to us, I’m sorry Steve, you’ll never see huge grassroots movements around building software for the Mac.

Did you know? (Setting output filename to a field value of the message without any custom code or orchestration)


I saw this question in the BizTalk newsgroups:


> Hi,
>  Is it possible to set the filename of a message with a value inside it
> which is available as a promoted property..
> I know this can be done using a custom pipeline component .But is there a
> way without it?
> I have no orchestrations in my solution..
>
> TIA
>


Yes, it is possible!… here is how.


1. Right click on the schema node you want to promote, select Promote–>show promotions.
2. On the “property fields” tab, click on the folder icon (to add new property
schema)
3. Expand the references, expand Microsoft.BizTalk.GlobalPropertySchemas and select  FILE.bts_file_properties.
4. Add your node as promoted and select ReceivedFileName in the property column as the property to which to promote to.
5. In the send port configuration use the macro %SourceFileName%
6. Don’t forget to use XMLReceive pipeline at the receive port.


That’ it! No custom pipeline no orchestration. This can be useful in content based routing scenarios where there are no orchestrations involved.


The XMLReceive pipeline will overwrite the source file name value in the context with the value of the field inside the message.


Regards


Benny Mathew
Seamless Integration Solutions
BizTalk Consulting, Development, Training
Bangalore, India
http://www.seamless.in
http://GeeksWithBlogs.net/benny


 

.NET 3.0 Community Launch

This evening was the .NET 3.0 Community Launch event at the Dallas

.NET User Group. With our trusted leader Omar away in Ft. Lauderdale, on

business I’m assured, Keith handled everything wonderfully and things went very smoothly.

Four local developers took turns walking us through the new features of .NET 3.0,

starting with Shane Holder doing a short introduction and Windows Workflow Foundation

mention. This was short on details but DDNUG had recently had a speaker on WF

so there was a reason.

Second up to bat was Abraham

Saldana talking about WCF, this was a good talk but short due to the launch event

format and I look forward to next month when DDNUG will be graced with the presence

of Sam Gentile to talk about WCF.

Third up, talking about the red headed step child of .NET 3.0, was Trent

Nix on Windows CardSpace. Trent doesn’t realize this but for sheer “it got

people talking” his presentation on WCS won the night hands down but more on that

later. It was an excellent overview of Card Space and it’s strengths and shortcomings.

Finally came my bud Dave O’Haratalking

about Windows Presentation Foundation. This was a good talk, driven by several

of the examples I had seen before but still very cool. It got a lot of interest

from the crowd, and he even put me on the spot at one point when pointing out the

namespaces at the top of the XAML pages for the quote:

“If it doesn’t have namespaces it’s nothing more than angle bracket delimited files.”

Which I believe it Scott Hanselman as butchered

by Tim Rayburn.

After the launch event several of us, Caleb,

Dave, Shane, Abraham, and some others went over to a place called “Hole in the Wall”

over on Harry Hines and 635. Burgers, Bikes and Blues rule the day here, but

on the back patio that night, under the glaring lights of Caleb’s

camera we had a great discussion about lots of stuff but mostly Identity, CardSpace

and OpenID. It was a great time talking with some really bright guys about the

pickle that is the Identity problem. Caleb recorded nearly the entire time for CommunityCast.TV and

yours truly even threw down a challenge to the community at large backed with dollars,

but for those details you’ll need to wait until Caleb gets the videos posted.

Custom Disassembler Component – Remember the Context Properties!

This is really a post to remind myself not to be quite so stupid in future….
I’ve been developing a custom pipeline disassembling component over the last few days to take a single purchase order from a customer and split into multiple orders based on (potentially) multiple delivery addresses. The component worked well through the Pipeline.exe […]

Microsoft Technology Centers looking for a few good people

Here at Pluralsight we host many of our courses at the Microsoft Technology Centers (MTC) around the world. They are awesome technical facilities used for customer interaction and education.
I just got an email from Steve Resnick, Microsoft’s National Technology Directory for the US MTCs, who says they currently have 6 job openings spread across NYC, Reston, San Jose, and Irvine. If you’re interested, contact Steve directly (steveres)or shoot me a note and I’ll forward it along.

Covast EDI Accelerator – No Authorization for Document Type

Earlier this morning, we received the following error from our production Covast EDI Accelerator implementation:
Error encountered: ERROR (13), interchangenr 61059 :
No authorization exists for this document type. Check the port properties.
sender: [Senders Trading Partner Name][DEFAULT], recipient: [Recipients Trading Partner Name][DEFAULT], source format: [3 2 1 ], source document: [Purchase order message]

We were thrown […]

It’s time for Training and Holiday

I’m taking my family (my wife Gowri and our little son, 3 months old Aryaa) for a long 4.5 weeks holiday in India. For the first time I’m going to test out some training in India. I booked myself for .NET 2.0 distributed apps training bootcamp, an intencive 10 day training program (6 days a week and 10 hours a day).  After moving to UK 7 years ago, this is the first time I’m doing a proper training in India. I’ll try to post some updates on how the course is progressing, and whether its worth utilizing portion of my holidays for training in India. I visit India atleast once a year to see my parents, close relatives and friends. So, if it works out, then it will be the most cost effective way for me to do some training, which will enable me to do more training for the same budget. 

Nandri!

Saravana

Team Foundation Server Administrator’s Guide

Fresh out from Microsoft and likely of interest to a couple

of TFS junkies I know is the Team

Foundation Server Administrator’s Guide. This document is a replace for

the, now deprecated, Team Foundation Planning Guide. Download, enjoy, and if

you need help with your TFS install drop me a line, I

know some guys.

Update: Also out is a new Visual

Studio 2005 Team Foundation Installation Guide with updates for SP1.

Is there a way to configure one send port to send a message to a document library based on a parameter?

This question comes up quite often that it deserves its own post. Is there a way to configure one send port to send a message to a variable destination based on a parameter? For instance when using WSS adapter, can you send a message to a different document library based on the message that’s being processed?


The answer is yes, it’s possible to do this in two ways:



  • using dynamic send ports, the destination URI and the configuration of the send port can be set programatically in the orchestration for every outgoing message. This method has the advantage that no ports have to be pre-created.

  • using role-links and parties. For each party you need to pre-create and configure a pyshical send port. You will have pretty much a party per destination. You enlist the parties in the appropriate role. Then, in the orchestration the only thing that you need to do is set the party associated with the role-link. The physical send port of the party associated with the role-link will be used to process the outgoing message.

I included below more information on how to do this using dynamic send ports which is the more simple & frequent approach.


The URL for a WSS adapter dynamic send port will be something like this:
     ‘wss://ServerName/sites/MySite/MyDocumentLibrary/’  if you installed the web service on an HTTP site
     ‘wsss://ServerName/sites/MySite/MyDocumentLibrary/’ if you installed the web service on an HTTPS site (notice the additional s in wsss://).
 
and you can set it programatically from the orchestration (like below) every time you sent out a message
     dynamicSendPortName(Microsoft.XLANGs.BaseTypes.Address) = “wss://ServerName/sites/MySite/” + lookedupDocLibName;
 
The rest of the send port configuration information must be set on the outgoing message using the Config* context properties documented here
http://msdn2.microsoft.com/en-us/library/aa547920.aspx


For instance:
    outgoingMsg(WSS.Filename) = “file1.xml”;
    outgoingMsg(WSS.ConfigOverwrite) = “yes”;
    etc.
 
Video 04-WSSAdapter-PropsInOrchestration.wmv shared here includes one such dynamic send port example
http://blogs.msdn.com/ahamza/archive/2006/04/18/WssAdapterVideosWebcasts.aspx