I am currently working in asp.net and having almost 1 year of experience. Now my company wants to change my technology and wants to put me in mobile development (might be other than .net mobile development). Would this be harmful for my career? As I have heard that it is beneficial to have a long experience in a specific technology than multiple ones.
I'd say yes, it is beneficial.
I can say I'm a jack of all trades and master of none. And it holds me back. I get bored with a technology before I get to be truly adept in it, I move on to something new and interesting, and as result, my options are limited.
Oh, don't get it wrong, I have no trouble finding a job. I'm getting more job offers than I could ever handle. But all the BEST ones - the ones that require a true guru level knowledge - are out of my reach. I'm still looking for one where my cross-domain knowledge will be an asset. Kinda system integrator, bringing two or more worlds together.
But it seems most companies prefer an approach of getting X teams doing X entirely different things, giving them X team leaders truly expert in their specific domains and without a bit of understanding of each other's technology, tell them "Talk to each other", and as result, release some frankenstein monster of a product, pieced together from not quite matching parts.
The advancement, career path is all about climbing one single ladder from the bottom up. If you want diversity, you must climb another ladder from the bottom up, and it doesn't matter for your new potential employer how far you went up on the previous one, and for the current employer you'll remain "that Perl guy" forever.
Experience in a technology doesn't matter so much if you're Smart and Get Things Done
See what Joel Spolksy looks for in an interview candidate, smart employers would have read this article or be aware of its contents and will be looking for the same thing.
Personally, it's better to be Smart that can learn new technologies quickly and adapt to changing environments Get things done. Than Smart that can't adapt.
Technology changes so quickly that you may need to adapt what you learn making your specialization redundant.
I think the only thing that will hurt your career is if you stop learning new things. As soon as you stop learning and applying new things you will stall and fall into a rut.
At the moment I'm learning functional programming in C#, F# and Haskell, Frameworks like NServiceBus, Document DBs like RavenDB etc.
Even though I don't use these technologies in my day job, it makes me a better programmer for when I do.
Your question basically is:
Specialist vs. Generalist
I have seen many specialists who went on to make good money. Specializing in a single skill however can be risky if the jobs start to dry up in that skill and it becomes harder and harder to find work. Most specialists I know move to different cities every year to follow the work, this can be a tough life for a family man.
I myself think being a Generalist is much more rewarding. I get job security knowing that I have skills in both Java and .NET technology stacks and am starting to learn Python on the side. I may not make quite as much money but I have the peace of mind knowing that if the economy gets really bad I have more choices than the specialists. Also I never had to leave my home city to find good jobs.
EDIT: Also, I would like to add that even with general skills on a resume that if I act confident to the point of arrogance that I convince most interviewers I am just as good as the specialist. I have gotten job offers for over half of the interviews I have went on in my career so I must be doing something right.