.NET How To Visual Studio

Creating MSI installer for Application

Recently I was tasked to create MSI installer for our current application which is in development phase. While browsing project types in VS, I had known that VS has ability to create installer using Install Shield, but that was pretty much of it. I have never worked with them before. But after working with windows installation project for few days, it looks pretty straight forward process to me. I mean of course, we can customize installer anyway we want and it can get pretty complex subject, but out requirement was not so fancy (at least at this moment Fingers crossed) so I am overall enjoying working with it.

For this demo I have created a very simple console application in C# and I am creating installer for that app. This installer will allow user to install that app to any location, just like any other app. And this application is targeted for only 32bit machines. This console application basically runs in a loop until user quits it, with each loop it displays two random number and user is required to add them (I know its pretty basic app .. but this demo is for installer not for some fancy app Smile). I am actually following old MSDN walkthrough which explains step-by-step process to create MSI installer.

First, I have created a console application project “Installer Demo”. Like below.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InstallerDemo
class Program
static void Main(string[] args)
char cont;
Random r = new Random();
int i = r.Next(1, 10);
Console.WriteLine("First Number: {0}", i);
int j = r.Next(1, 10);
Console.WriteLine("Second Number: {0}", j);
Console.Write("Total is: ");
int k = i + j;
var l = Console.ReadLine();
Console.WriteLine(k == Convert.ToInt32(l) ? "True" : "False");
Console.WriteLine("Another Addition ?? Y/N");
cont = Convert.ToChar(Console.ReadLine());
} while (cont == ‘Y’ | cont == ‘y’);




.NET How To Windows

Setting up personal Source Control Server using Visual SVN Server

I was working on one of my personal projects and I thought that it would be really cool if I have my own source control mechanism so I can always rollback to older versions if I ever need to do it. Till now, I was always just keep multiple copies of each project so if I have to rollback or even just have to compare files then I just open them up and compare it. But with my prolonged exposure to SVN, I found that it is more easy if I have some sort of source control server, I can use it to keep all of my repositories and it will make my like more easy. So just last night I finally completed that task.

Tools of trade,

To setup dedicated Visual SVN Server I used virtual machine with Windows 2008 Server (having 16 Gigs of RAM really helps Open-mouthed smile). Just make sure that machine has static IP, because DHCP will have random IP of machine and then it could be wonky for SVN Server.


Developing ASP.NET Application in MONO under Linux

Today, I was playing with my new install of Linux. I installed Mono in it… (for those who don’t know what is MONO, is a cross platform IDE that can be used to develop .NET application in any environment) .. With my past encounters with Mono, I know that it is sort of complicated to make Mono work properly and you need to configure it specifically to work without glitch 🙂 … but with this newer Ubuntu 11.04, the process was way too simple.

During installation from "Ubuntu Software Center" I can select which add-on I want to install with Mono and everything will be configured automatically !! So only user intervention is just to select which add-on they want. Once you are done with installation you can fire up the application and start coding right away. Well, it is other case if you are way too much habituated with drag ‘n drop Visual Studio environment then you will find it a bit difficult to work with Mono since it doesn’t have VS like rich UI. But I say, it is way better then what you can get in Linux.

Sample Code:

<form id="form1" runat="server">

<asp:Button id="Button" runat="server" Text="MONO" OnClick="Button_Click"/>

<asp:Label id="Label" runat="server" Text=""/>


protected void Button_Click (object sender, EventArgs e)


Label.Text = "Hello Mono !!";


I guess this is one more reason to use Linux 🙂 …

That’s it for now ….

Gaurang Sign

.NET ASP.NET Software Tips Visual Studio Windows

ASP.NET and Page Not Found Error while debugging !

Being sunny weekend today, with full of energy I began to work on making some prototype application which I have to present to my client sometimes during next week. It been a while since I worked on ASP.NET on my application (@ 2 weeks) since I installed Sharepoint Server 2010 demo in my machine. So, with having no idea of a monster under the bed, I made a simple web app and fired it up to debug … and with my little surprise, I got really weird “Page Not Found” error !!! To be honest, I have not seen this error before until today. And I had no idea that what went wrong with it. But I thought that may be it is because something is blocking up my access of application to web server. I checked with my new firewall software (Online Armor) which I had installed few weeks ago for testing purposes (yah, I love testing everything … smile_wink) …

How To

Changing Default Database in ASP.NET application

If you have been developing application in ASP.NET and if you were using SQL Server Express edition, then this is not for you … But if you are someone like me who is using SQL Server Standard, Enterprise, Web or Developer edition (not sure about workgroup edition) then this may be the first problem came across you when, you were trying to configure your website from WEBSITE -> configuration option. Everything seem to be look fine, till you click on “Security” setting … and you will be welcomed with screen here…  config_error

Un-doubtly SQL Server Express is first choice for someone who don’t want to be in mess of managing whole dbms or students or may be even many developers are using it as its free and can be a good choice for small web application. And I don’t want to debate on it (or say, I really don’t care smile_devil)