Tuesday, July 26, 2011

ASP.NET webdev server as an external tool

The ASP.NET development server is a very useful tool but now and then I find that I need to use a service or website that I’m developing in another solution than in the one I’m working in. I found that it is easiest just to add the instances of often used services and websites to the external tools list in Visual Studio.

To do this go to the Tools menu in Visual Studio and click on External Tools.
Then click the Add button to add a new item. Give it a title and enter as a command the following:

C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.EXE

The path may differ depending on your windows version and installation. I'm using Windows 7 with Visual Studio 2010.
The arguments should be:

/port:XXXXX /path:SSSSS /vpath:/

Where XXXXX is a port number used for the development web server and SSSSS is the web server / web service path. The /vpath points to the application root of the service or site

For instance:

/port:21000 /path:C:\Sources\MyProject\WcfHost /vpath:/

Now you can start the service from any solution and you don’t need to keep the solution in which the service or site is made open. Just remember at some point to stop the development server again because it will not stop automatically by closing Visual Studio.

Sunday, July 24, 2011

Wordpress or .NET, that's the question!

As a .NET developer I mostly fill my days making ASP.NET websites, and Windows forms application for my big clients. A few months ago I decided to take a look at making Wordpress and Joomla websites. I wanted a tool that would help me make websites for small businesses quickly. Mostly I didn’t want them to come to me later and ask me to change the color of the third word in the second paragraph to red…. In other words they should be able to manage the content of their websites themselves, in an easy way.

Let’s be honest, you can make wonderful websites in .NET but you need a good CMS behind it and a good framework at the front end to quickly make websites with it. If you don’t have this, making a site is a lot of work, maintaining it even more!

In Wordpress on the other hand I can make a good looking, company website in a few hours. This includes registering the URL, putting the website with a hosting company, making the site, doing the styling and putting the first content in it. The downside of a CMS like Wordpress is that making it look and do EXACTLY what you want also involves a lot of work, and with Wordpress you’re stuck with a “simple” scripting language like PHP. PHP doesn’t come close to the powerful languages you have in .NET!

So I decided to cover both sides of the market; the quick and “limited” side of Wordpress and the not so quick but very powerful side of .NET. I will just let it depend on the wallet of the customer!
At the moment I love doing both things so it’s also making my work a lot more interesting!