Iranian songs on the iTunes Store

By Mohammad Mahdi Ramezanpour at May 17, 2010 17:08
Filed Under: Other

There are a lot of music players in the market that you can use in order to listen to music such as Windows Media Player, Winamp and JetAudio. But if you’re familiar with the Apple or you have one or more Apple products including iPod, iPhone, iPad and …, you can’t begin to use any other media player applications except the iTunes. These days iTunes becomes very popular and nearly all people I know believe that the iTunes is the most powerful and popular media player in the world. iTunes includes a store section that enables users to download music, movies, and even applications for their Apple products.

iTunes Store

The iTunes Store is a software-based online digital media store operated by Apple. Opening as the iTunes Music Store on April 28, 2003, with over 200,000 items to purchase, it is, as of April 2008, the number-one music vendor in the United States. On 24 February 2010, the store served its 10 billionth song download; this major milestone being reached in just under seven years of being online. iTunes accounts for 70% of worldwide online digital music sales, making the service the largest legal music retailer. While most downloaded files have previously included restrictions on their use, enforced by FairPlay, Apple's implementation of digital rights management, iTunes initiated a shift into selling DRM-free music in most countries, marketed as iTunes Plus. On January 6, 2009, Apple announced that DRM had been removed from 80% of the entire music catalog in the US. Full iTunes Plus availability was achieved on April 7, 2009 in the US, coinciding with the introduction of a three-tiered pricing model.

The following photo is the iTunes Store’s first page. You can click the picture for a full-size view:

iTunes Store's first page

iTunes is now the #1 music retailer in the world. – Steve Jobs

There’s bunch of cool features that you can use in order to download and your favorite music/movie/application but this is not what I’m going to talk about.

Companies like Apple has boycotted Iran from their products and services so you can’t download any kind of files from iTunes Store if your IP address is in Iran.

A couple of days ago, I was searching throw the iTunes store and searched for the word “Hichkas” and I shocked after I saw the result:

iTunesStore

The results contain latest released by Hichkas and if you take a look at the other items in the result window, you can see some other Iranian albums which are all available to download right from the iTunes store!

Conclusion

Now you can download every kind of media you want right from the iTunes Store and as you know, it’s not too expansive. I’m sure that most of you can afford it.

By the way, this is very good news for Iranian music providers to put their releases to the iTunes Store so everyone in the world can download and listen to them; and it’s very surprising that the iTunes Store is not limited to music! You can download/rent movies, podcasts, etc.

Hope it helps.

Why some of the ASP.NET web controls Require ViewState under any circumstances?

By Mohammad Mahdi Ramezanpour at May 09, 2010 10:33
Filed Under: ASP.NET

The first thing you should know before I continue is the definition of ViewState:

View state refers to the page-level state management mechanism, utilized by the HTML pages emitted by ASP.NET applications to maintain the state of the web form controls and widgets. The state of the controls is encoded and sent to the server at every form submission in a hidden field known as __VIEWSTATE. The server sends back the variable so that when the page is re-rendered, the controls render at their last state. At the server side, the application may change the ViewState, if the processing requires a change of state of any control. The states of individual controls are decoded at the server, and are available for use in ASP.NET pages using the ViewState collection.

When you’re developing an ASP.NET Web-Forms application and the performance is a consideration, you can disable the ViewState in some of your pages that you don’t want to make use of. Disabling ViewState will affect the page’s HTML source code a lot and removes a lot of useless codes from your page as you can see in the picture below:

A website that disabled the ViewState:

APageWithoutViewstateEnabled 

Another website that let the ViewState being enabled:

PageWithViewStateEnabled

You can see the difference between two pictures above. So disabling the ViewState is something necessary if you don’t want to use it.

But unfortunately, some of the controls in ASP.NET such as RadioButtonList need to use the ViewState under any circumstances! So you CANNOT disable the ViewState if you need to use these kinds of controls.

I think is an ASP.NET bug so I reported is to the Microsoft. I believe, about 70%-80% of ASP.NET developers don’t want to use the ViewState at least in some of their pages.

IIS 7 URL Rewrite extension and OutputCache conflict

By Mohammad Mahdi Ramezanpour at April 23, 2010 06:30
Filed Under: ASP.NET, IIS

These days, I’m developing a new .NET website which is hosted by Windows Server 2008 R2 and IIS 7.5. For some purposes, I was using the “Intelligencia.UrlRewriter” module which was introduced by Scott Guthrie and everything is working fine on my Windows Server 2003 and IIS 6 home server. I also tested it on my development machine which has a Windows 7 Ultimate installed and everything was going well.

For some security reasons, my hosting company restricted using rewrite modules and they suggested me to use IIS 7 native URL Rewrite extension.

During the migrating process, I realized that the “~” operator is not working correct! Fortunately Ruslan Yakushev was explained about the “~” failure in URL Rewrite module:

You can use the ~ operator in ASP.NET Web server controls to reference the root of the application directory when you need to set a path. However, if URL rewriting changes the directory hierarchy of the requested URL, this can cause links that are specified with the ~ operator to be resolved incorrectly. For example, imagine that the Default.aspx page at the root of a Web application named app1 contains the following Image control:

<asp:Image runat="server" ImageUrl="~/Images/MyImage.gif" />

If URL rewriting changes the URL from http://localhost/app1/folder/file to http://localhost/app1/default.aspx, the links that are specified with the ~ operator will be resolved relative to the rewritten URL path, which would be relative to the /app1 folder. The following example shows the resulting HTML markup for the img element:

<img src="Images/MyImage.gif" ... >

Because the browser requested http://localhost/app1/folder/file, it will try to obtain the image from http://localhost/app1/folder/Images/MyImage.gif. This results in a 404 (File Not Found) error.

The URL Rewrite module for IIS 7.0 includes an update for ASP.NET that fixes this behavior. The update causes the ~ operator in Web server controls to be resolved relative to the originally requested URL. In the previous example, the HTML markup in the response will contain the correct URL path for the img element, as shown in the following markup:

<img src="../Images/MyImage.gif" ... >

The update for ASP.NET applies only to .NET Framework 3.5 SP1 and later. In order to get the update, upgrade the .NET Framework to version 3.5 SP1 and then run the IIS 7.0 URL Rewrite module installer, which will install the ASP.NET update.

But my problem didn’t solve! Even check my web server and saw that it has .NET Framework 3.5 SP1 and UrlRewiter 2.0 installed!!!

After lots of challenges, I realized, the “~” operator in my user controls that has the Output cache directive enabled, doesn’t work well and after I omitted the @OutputCache from my user control, everything was back to normal. Note that if you don’t use the UrlRewrite module in your application, everything will be working well, even if you set the OutputCache directive and I think it’s a bug that should be reported to the Microsoft.

I hope it helps.

Apple iPad in Iran!!!???

By Mohammad Mahdi Ramezanpour at April 06, 2010 08:09
Filed Under: Other

It’s only 3 days that Apple released the iPad and about 1,000,000 people around the world have bought it.

Apple iPad

The iPad is a tablet computer developed by Apple Inc. Announced on January 27, 2010; it is part of a category between a smartphone and a laptop computer.

After 3 days, Iranian local TV reported that a company had imported the iPad to the Iran and they’ve sold about 3,000 iPads to now!!! It’s outstanding. I don’t know about the price yet but I’m going to go to Paytakht in order to get some information about it.

If you live in Iran, you can buy the Apple’s iPad if you want.

UPDATE: According to one of my friends, iPad's price in Iran is about $1200!!! I can't believe that! WTH?

Hope it helps.

How to change Visual Studio 2010 Color Palette

By Mohammad Mahdi Ramezanpour at April 04, 2010 04:51
Filed Under: .NET General

I know a lot of developers who can’t stand Visual Studio color scheme and they need to change the color of it. As you know, Microsoft changed VS’s color scheme to a much better but some of the developers that I know can’t stand it either.

Visual Studio 2010 Color Scheme

After some days of research, I found an extension for Visual Studio 2010 (RC is included) which changes the VS’s color scheme to whatever you want. Here’s an example:

Themed Visual Studio

After you install the extension, a “Theme” menu will be added to your VS IDE:

Theme Menu 

As it’s obvious, you can select from the list of built-in themes or, you can customize a new theme for yourself.

You can download this extension by Click Here.

Matthew Johnson – Developer, Visual Studio Platform, described this extension in details so you can check it out here: http://blogs.msdn.com/visualstudio/archive/2010/01/04/changing-visual-studio-s-color-palette.aspx

Hope it helps.

Currently Reading

Quote of the day

Send Persian SMS