(a) Whenever necessary to make an inspection to enforce any of the provisions of this article, or whenever the building official has reasonable cause to believe that there exists in any building or structure or upon any premises any condition in violation of this article or the technical codes, the building official may enter such building, structure or premises at all times to inspect the building, structure or premises or to perform any duty imposed upon the building official by the technical codes; provided that, if such building or premises is unoccupied, he shall first present proper credentials and request entry. If entry is refused, the building official shall have recourse to every remedy provided by law to secure entry. (b) When the building official shall have first obtained a proper inspection warrant or other remedy provided by law to secure entry, no owner or occupant or any other person having charge, care or control of any building, structure, or premises shall fail or neglect, after proper request is made as provided in this section, to promptly permit entry therein by the building official for the purpose of inspection and examination pursuant to this article.