Clearly, having a 2-factor in a graph is a necessary condition for a graph to be hamiltonian, while having an even factor in graph is a necessary con-dition for a graph to have a 2-factor. In this paper, we completely charac-terize the forbidden subgraph and pairs of forbidden subgraphs that force a 2-connected graph admitting a 2-factor (a necessary condition) to be hamil-tonian and a connected graph with an even factor (a necessary condition) to have a 2-factor, respectively. Our results show that these pairs of forbid-den subgraphs become wider than those in Faudree, Gould and in Fujisawa, Saito, respectively, if we impose the two necessary conditions, respectively.