TITLE: Surjective+finite-type+quasi-finite doesn't imply finite
QUESTION [7 upvotes]: Exercise II.3.5 (c) in Hartshorne, Algebraic Geometry, asks to find an example of a surjective, finite-type and quasi-finite morphism of schemes which is not finite.
I need to find a finitely generated $A$-algebra $B$ which is not finite generated as an $A$-module. The only examples, I could find, of such a kind of $B$ give rise to a morphism which is not quasi-finite. Basically I was trying to use some modification of the classic $B=\mathbb{C}[x]$. I have also thought to  find a morphism which is not closed, since we know that a finite morphism is always closed, but even this way didn't lead me anywhere.
Do you have any suggestion?
P.S.: $f$ quasi-finite means that $f^{-1}(y)$ is a finite set for every point $y\in Y$.
MOREOVER: while thinking at this example, I asked another question to myself. Which is a quasi-finite morphism which is not of finite-type? 
Thank you very much!

REPLY [2 votes]: One can also find examples over the complex numbers in which the source is irreducible:
Let $f \colon \mathbb{A}^{1} \to \mathbb{A}^{1}$ be the ramified cover given by $z \mapsto z^{2}$ at the level of coordinate rings. Let $i \colon \mathbb{A}^{1} \setminus \{ 1 \} \to \mathbb{A}^{1}$ be the open immersion of the complement of a closed point which is not the origin. Then $f_{0} := f \circ i$ is quasi-finite and surjective, but not proper, hence not finite.
One can check that $f_{0}$ is not proper with the valuative criterion for properness, but the intuititon for this example came from the analytic topology. In fact, when I googled "a finite morphism is closed in the analytic topology" I found this answer, which is exactly the kind of example that I had in mind and seems to confirm the suspicion I had about finite morphisms being closed in the analytic topology (doesn't really confirm it, but it seems that the author was thinking along similar lines at least).