I'm not a lawyer, but I've been looking into this same issue recently, so here is what I have found.
Where you incorporate defines the set of rules that your corporation operates under, but it doesn't hide you from the state that you operate in. Many people cite Delaware as a favorite state because of their rich case-law, and favorable rules. However, you can't escape registering in the state that you operate. Even though you might be a Delaware corporation, you still have to register with the state that you operate in, and you still have to pay the state franchise fee. As an example, if you operate in California, but incorporate in Delaware, you have to qualify (register) your corporation to do business in California, and you are still on the hook for the $800 annual franchise fee.