Nowadays, Outsourcing relationship in the area of information technology for local organizations is not an option, but a necessity strategy. By outsourcing, organizations can focus on core functions, decrease their operational costs and technology risk, and to use external sources to achieve the organizational objectives. In this research, local organizations in Zanjan province which have outsourcing experience in the area of information technology, were selected as statistical population, to study the effect of knowledge sharing based on outsourcing with regards to contingency approach. Findings of this research showed that knowledge sharing with regards to situational variables, leads to influence success of IT outsourcing. To put it in other words, relationship between knowledge sharing as independent variable and success of IT outsourcing as a dependent variable, is influenced by partnership and organizational capabilities. Therefore, IT outsourcing is a successful strategy if partners through partnership to share their organizational knowledge and by enhancing their organizational capabilities to use the transferred knowledge in an effective way.