Archive for the ‘Mac/OS X’ Category

Testing IIS in Parallels from OSX

Tuesday, December 11th, 2007

If you’re running visual studio in Parallels you can set it up to deploy to a virtual directory in IIS then make that site accessible to OS X. This is great for when developing web services or remoting in .Net with Flex Builder in OS X. You can also assign an alias to your windows IIS server meaning you don’t have to remember the IP address of the Parallels VM.

Setup Visual Studio to deploy to IIS Virtual Directory
By default since VS 2005, when you run a website project it will execute in the built-in web server in visual studio. You can however set it to deploy to your windows version of IIS by doing the following:
Goto your web project’s properties (right click the project in the solution explorer and hit properties),
Select the “Web” tab,
In the Servers section select “Use IIS web server”,
Enter a name for your project and hit the “Create Virtual Directory” button.

When you run or debug your site it will now use IIS instead of the built-in web server.

Run IIS website from OSX
You’ll need to do a couple of things before you can run your IIS deployed website in OS X, firstly you need to enable remote access to the site and secondly you need to find the IP address of your parallels VM.
Go to Control Panel, Adminsitrative Tools, Internet Information Services,
Expand your Computer node and right click on the websites folder and click Properties,
In the Directory Security tab click the annonymous access Edit button,
Check the box titled “integrated windows authentication”.

Now to test your site, open a comand prompt in windows and type ipconfig to find out your windows VM address. Then in OS X open your browser and enter http://[your.ip.address]/yourVirtualDir/ and you shoudl see your asp.net website running.

Setup an alias instead of remembering the IP address
I found this out from a comment on Andy Jarrett’s blog, use the following command from terminal to use a more friendly name to access your IIS webserver (replacing ‘localhostwin’ with your chosen alias and IP address with your XP’s IP:
sudo dscl localhost -create /Local/Default/Hosts/localhostwin IPAddress 10.23.0.1

Here’s the rest of the comment which has some other useful commands:

sudo dscl localhost -create /Local/Default/Hosts/ridiculous.nonsense.monkeys IPAddress 192.168.0.1

Enter your password when asked, and you can now ping 192.168.0.1 with the name ridiculous.nonsense.monkeys

You can see the results of your work with:

dscl localhost -readall /Local/Default/Hosts

And to undo your handy-work:

sudo dscl localhost -delete /Local/Default/Hosts/ridiculous.nonsense.monkeys

P.S. You can see the results of your BSD flat-file method with this command:

dscl localhost -readall /BSD/local/Hosts
# Posted By j0no | 11/11/07 8:01 PM

Mac bandwagon

Tuesday, December 11th, 2007

So, I’ve been sucked in and caved. I now own a brand new 17″ 2.4ghz MacBook Pro.

I’ve been getting familiar with it for a few days now, keeping my HP laptop for work whilst familiarising myself with the mac way of doing things out of hours. It’s been an odd experience, I finally understand how it feels to be clueless using a computer as I’ve had very little previous exposure to the Mac way of doing things.

First impressions though are very good, I picked the machine up with Tiger installed and after reading a load of people’s issues with the Leopard upgrade I opted for a clean install and wiped Tiger completely. Seems to be working well so far except for the trackpad seems to stick for a second or so randomly after typing.

I’ve just about managed to setup the bare-bones I need to use this as my daily machine, although I’m sure I’m missing a few essentials which I’ll find out in the coming weeks.

So far I have:
Eventually managed to get on my wifi, I had to change the security settings as I couldn’t get onto 64bit WEP which was a pain, now using 128bit WEP at home and WPA at work (WPA seems to be better for stability and security).
Setup Mail.app to run with my MS Exchange account (which I didn’t realise I could do).
Installed Flex Builder 3 beta 2 which appears to run quite nicely.
Installed Firefox as I don’t really like safari too much.
Installed CoRD which is a very cool remote desktop tool, far better than the MS remote desktop client i was used to.
Installed adium IM client and imported my MSN and GTalk accounts (very nice free IM software).
Installed Parallels and installed XP which is now running Visual Studio 2008 beta 2.

Everything seems to be running nice and fast with no issues to report as yet, so I’m pretty happy with the switch :).

Why the switch?

In the new year we will be doing alot more RIA work at Moov2 (in fact we’re going full-blown RIA development agency but more on that later), as a result I needed a better spec machine as the trusty old HP choked a bit when running visual studio, flash and flex builder. I was very tempted to go for a Rock laptop as they look great and are very powerful machines. But I was also tempted by the draw of a Mac as all the cool kids seem to be switching these days and I’m very easily tempted by something new and unknown to me. After all I’ve been using windows machines for some 17 years since windows 3.0 and I really wanted to try something new. I’ve got a Linux box running Suse but I personally don’t think Linux is quite ready for day-to-day use as a development machine due to the lack of polish and wide-support. However my Linux box, which hosts this site, is by far the most reliable machine in the office. This is possibly to it’s detriment as whenever I do need to use it I’ve completely forgotten all of the commands as it’s such a long time between uses!

Anyway back to why the MBP, I have no real issue with Microsoft. I’m not ashamed to admit I love .Net (particualrly now there’s the whole alt.net movement), am impressed with the Silverlight/WPF workflow (and the potential future opportunities MS will bring to the game). I’m comfortable in a lot of the MS server environments, somewhat prefer SQL Server to MySQL and nowadays find XP rock solid (I’ve never been too fussed with Vista though).

But, after a bit of research as to the performance of my windows-only tools of choice in Parallels, I opted for the Mac as with Parallels there’s really no reason not to get the best of both worlds.

I’ve setup Parallels to run XP in full-screen mode in one of my Leopard ’spaces’ so I can switch between full-screen windows and OSX with the press of a button, however I’m surprised at how little time I spend in windows other than to use visual studio. Being able to tab between Flex Builder in OSX and VS in windows is great and I can even test my flex/.net projects in OSX whilst debugging the .net in windows.

All in all i’m very happy with the purchase and only hope Apple sort out some of the Leopard issues some others are having asap, because I don’t want to have made the switch just as everyone else starts bailing!