How to restrict a view to display only 2 content types? I have created a view (/page_view), which displays two content types.

This view contains a contextual filter for user to be able to see only one particular content type (/page_view/content_type_1 and /page_view/content_type_2).

But in my case the user by typing for example /page_view/content_type_3  is able to see other content types which should not be included into the current view.

How can I restrict a view to display only 2 content types?
Sounds like you need to set a filter type as well instead of just your contextual filters. So under filters choose "Content Type" and choose ONLY the content types you wish the user to see. Then the contextual filter set it to "No results found" (see screen shots)