Monday, April 8, 2013

Unrecognized configuration section system.web.extensions when upgrading to ASP.NET 4.0

Recently I upgraded my solution to VS 2010. My solution contained almost 30 projects. After upgrading when I ran the solution for the first time I got following error:

Unrecognized configuration section system.web.extensions when upgrading to ASP.NET 4.0

After some googling it was certain that the error was due to upgrade but I could not find exact solution. Then I opened my machine.config file (located at C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config).
It had the "system.web.extensions" section. Suddenly I noticed that the entire text in the machine.config was in small letters(system.web.extensions) whereas in my projects' we.config, the first letter of every word was in capital letters. (System.Web.Extensions). When I changed my web.config to small case, the solution worked.

One complete day wasted on such small silly thing!!!!

Thursday, May 31, 2012

Find if backup file is complete or not

Frequently we get back up files from our clients to resolve their issues. But sometimes by the time the backup file reaches us, it gets corrupted either while creating the back up or while compressing or while uploading to ftp site or while downloading from the ftp site.
When we try to restore such file, we may get different error messages.

One message that I got recently was: Specified cast is not valid. (SqlManagerUI)

One very good way to find out if the backup file is incomplete is to execute following command

RESTORE HEADERONLY FROM DISK = 'C:\TEST.BAK'

It will show something like the below message which implies that the backup is not complete:





Tuesday, May 15, 2012

Its been long time that I opened my blog site. Today I was going through my own blogs, It felt nice. It's like you are seeing something close to you after a long time. It has been ignored for quite a while. I'll try to be writing more often. I'll be back soon.

Monday, December 12, 2011

How to Archive SQL error Logs

To create a new error log, execute following:

1. Restart the sql server service. It will create a new error log
2. Execute following:
Exec ('DBCC ErrorLog')
3. Execute following:
Exec Sp_Cycle_Errorlog

Tuesday, April 19, 2011

To find what caused a postback

Sometimes there could be multiple controls on UI and it may be difficult to figure out which control caused the postback while debugging.

1. On aspx/ascx page use following:

Request.Form["__EVENTTARGET"]

2. on a class file use following:

this.Page.Request.Form["__EVENTTARGET"]

Saturday, March 5, 2011

Take responsibility

Recently I came across the book named "License to live" written by Priya Kumar.

Though I had never heard of the writer or the book, I just bought the book.

The book is a short novel about someone who is lost in corporate maze. Her situation is similar to all the people who have achieved every professional success at a very short age, who has fulfilled all their dreams and they do not know what next? Those who think that they have all the happiness they have ever craved for in their life and yet they are not happy. It’s about a person who has lost the very purpose of living.

And then she meets someone she thinks who can change her life.
Through that person she is able to view her future, in fact multiple and drastically different versions. Few are really something that she wants to be where she is happy and content with her life and few that does not want to be where she has lost complete control of her life. There she realizes that any of these futures can be hers provided she works towards it.

Then she comes across her Past. The parts of past which she wants to bury because she has not been able to forgive herself for those parts of the past. Though she is very successful at present but the burden of past is not allowing her to enjoy the fruits of hard work. There she realizes that she has to let go of the past so that she can be happy in present.

But the most difficult part comes when she meets her present. Then she finds herself in time trap as she is never living in her present. She can see the reflections of her past and the imagination of her future but not her present. There she accepts the fact that she has to take responsibility. Only if she takes responsibility of her present, she can make her future better and she will not have anything to regret about the past.

While reading the book, though the situation was very hypothetical, I was able to relate to most of the parts of the book. So many times we are so worried about tomorrow that we forget to live today. We forget that today’s conscious effort will make a better tomorrow and a better yesterday.

So Many time we have a simple excuse "I hardly find time to do this" or "I am too busy" but we forget the fact that everyone in the world gets same 24 hours in a day. We compare ourselves with our neighbors/competitors and complain that they have got too many resources which I do not have. But we forget that even we have a number of resources which they do not have.

Life gives equal opportunities to everyone in some way or other and it’s up to us how we make use of those opportunities.

Monday, January 24, 2011

Inspiration

As I have mentioned in my last post I was inspired to learn SQL server in detail after I started following Pinal Dave's Blog.

Similarly few months back I saw my friend was reading something on her PC. The title in big letters appeared very attractive.

I asked her what it that she is reading is.
She said: Robin Sharma’s' Blogs.

"Robin Sharma? Isn’t it that guy who wrote "the monk who sold his ferrari"

"Yeah"

I asked her for the URL.

I found the blogs from Robin Sharma very inspiring.

I browsed through many posts in his blogs and one of them was "60 TIPS FOR A STUNNINGLY GREAT LIFE"

I liked some of the points, laughed at some others.

Yet one point that caught my attention was "Read “As You Think”."

I got curious and immediately clicked on the link. Oh it’s another Self-help Book!!! That was my reaction.

Yet I could not contain my curiosity and searched for a synopsis.

The Synopsis was only few lines but quite inspiring.

"As we think we influence people around us. We have great power within us and we can shape decision of people around us. Decisions made by people which can change course of our lives."

ohh!! Is it!!. Let’s try.

I was going through a lot of job interviews those days and was always scared whether I'll make it or not.

I started thinking in a positive way "This person is going to ask me only the things I know. He will like my knowledge and experience and offer a job"

Every time i would go for an interview I would have only this thought in mind. It worked!!!! In a month I cleared 4 out of 5 job interviews. Amazing!!! Wasn’t it.

But mind is a devil as well. So there are some funny incidences as well. Whenever my lead would come near my desk I would say in mind "Go away". It will happen that the person would forget why he came to my desk and will go back to his desk.

There were multiple instances where I felt that the positive thinking helps.

What you think about yourself, you become that. Hence it’s really important that we control the way we think.