IIS Stopped

Some times it happens that suddenly when you start IIS (run > inetmgr) and you are shocked when you saw a red color stop icon there , that when you try to start it , it gives an unexpected error
The status there is “Default website stopped”

Solution : This is just because of the sharing of the port 80 . If any other software (ftp software , xampp , Skype , team viewer) shares or consumes that port then this will happen.
You can find which software is using that port by checking its setting or options or preferences in any of its menu

Normally it happens when Skype , xmapp or any software is installed first before IIS ,
No need to uninstall all , if you have too many software.
Just change the prot of default website make it 89 or 97 as per your choice

I normally suffered this in xampp and Skype , I just change the ports in xampp and Skype , because its good practice to make IIS at default port (80).

If the problem persists contact me here , via comments .

google currency converter code

Some times for our site we do neet to convert currency , here is the updated version i took from one blog and modified it in C#.net. 
You just have to pass Currency from (etc PKR) , currency to (etc $)
Then it will give you the exact amount
So no need to worried about update your currency every day. 
The code call the google api to convert currency

public static string ConvertCurrency (string To , string Amount , HttpRequest Request)

        string Expression = Amount + “USD” + “=?” + To;
        string url = “http://www.google.com/ig/calculator?hl=en&q=” + Expression;

        string response = “”;
        string responseMsg = Request.Params.ToString();
        string post = responseMsg;
        HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
        req.Method = “POST”;
        req.ContentType = “application/x-www-form-urlencoded”;
        req.ContentLength = post.Length;

        StreamWriter writer = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);

        StreamReader reader = new StreamReader(req.GetResponse().GetResponseStream());
        response = reader.ReadToEnd();

        char[] cChar = new  char[3];
        string[] _params = new string[100];

        cChar[0] = ‘,’;
        _params = response.Split(cChar[0]);

        string ConvertedAmount = “”;

        ConvertedAmount = _params[1];
        ConvertedAmount = ConvertedAmount.Replace(“\””, “”);
        ConvertedAmount = ConvertedAmount.Replace(“rhs”, “”);
        ConvertedAmount = ConvertedAmount.Replace(“:”, “”);
        ConvertedAmount = ConvertedAmount.Trim();
        ConvertedAmount = ConvertedAmount.Remove(ConvertedAmount.IndexOf(‘ ‘), ConvertedAmount.Length – ConvertedAmount.IndexOf(‘ ‘));

        return ConvertedAmount;