Vanishing of cohomology of affine scheme In EGA I 5.1, more specifically the proof of 5.1.9, which states that $X$ is affine iff the closed subscheme defined by a quasi-coherent sheaf of ideals $\mathscr{I}$ such that $\mathscr{I}^n = 0$ for some $n$ is also affine, it is proved in a nice way that the first cohomology of any quasi-coherent sheaf on an affine scheme vanishes, and I feel like the same idea can be used to prove the general statement about the vanishing of higher cohomology. I have seen no text where it is exposed this way, which makes me wonder wether it is correct or not. 
Let $X$ be an affine scheme (say, $X = \mathrm{Spec}(A)$) and $\mathscr{F}$ be a quasi-coherent $\mathcal{O}_X$-module.
By the results proved in EGA I section 1.4, there is actually an equivalence of categories between quasi-coherent $\mathcal{O_X}$-modules and $A$-modules (unlike Hartshorne's, EGA proves this without proving the vanishing of $H^1$, even though it is implied by what follows), and this equivalence is also an equivalence of abelian categories (it respects kernel, cokernel...). This equivalence is induced by the global section functor. 
(Edit: the mistake might be here, EGA only shows all of this for the $\tilde{}$ functor, and not for $\Gamma$, so the vanishing of at least $H^1$ would be needed to get a full equivalence of abelian categories. In that case, the following would show that at least, the vanishing of H^i follows formally from the one of $H^1$, which would seem reasonable then)
The "global section" functor $\mathscr{F} \mapsto \mathrm{\Gamma}(F, X)$ is naturally isomorphic to the functor $\mathrm{Hom}_{\mathcal{O}_X-\mathrm{mod}}(\mathcal{O}_X, - )$ (can be shown with the previous equivalence and the fact that $\mathrm{Hom}_{A-\mathrm{mod}}(A, B) \cong B$.)
So its $i$-th derived functor must be naturally isomorphic to $Ext^i_{\mathcal{O}_X}(\mathcal{O}_X, \mathscr{F})$, 
Using the equivalence of abelian category above (which must respects the Ext functor as an equivalence of abelian categories!), the latter is isomorhpic to $Ext^i_{A}(A, \mathscr{F}(X))$. But the latter is zero since $A$ is a free $A$-module, the Ext must vanish, and we're done. 
I have repeatedly heard that vanishing of cohomology in the affine case is non-trivial and that it is a big fact/theorem, in Hartshorne it looks like (I haven't read in much detail chapter III yet) is proved in an other way, with extra finiteness hypothesis and claims that the general case is harder, yet I feel like the method above exhibits it just as a categorical trick and some homological algebra on modules. So I think I am missing something in the above, but I can't see what. So:


*

*Is the above correct?

*If not, where is the (possibly stupid) mistake I made?


Edit: 
I just realized there is possibly a problem when I identify $Ext^i_{A}(A, \mathscr{F}(X))$ with $Ext^i_{\mathcal{O}_X}(\mathcal{O}_X, \mathscr{F})$ by arguing that equivalent abelian categories should have equivalent Ext. This seems intuitive, since the construction of Ext can be made purely "abelian-categorical", yet I feel like when I would flesh out the details, I would end up with a spectral sequence that would degenerate iff the higher derived functors of $\Gamma$ are $0$, which is actually what I am looking for. I am quite unsure at this point.
Another thing I am thinking is that we may use the equivalence of abelian category to prove that actually $\mathcal{O}_X$ is projective in the category of quasi-coherent $\mathcal{O}_X$-modules on $X$, using the equivalence of abelian categories. And then we could finish $Ext^i_{\mathcal{O}_X}(\mathcal{O}_X, \mathscr{F}) = 0$ the same way. 
Showing $\mathcal{O}_X$ is projective would not be so hard since it is $\tilde{A}$, that $A$ is projective, and then this would be finished by transposing a lifting problem from sheaves to $A$ (as per the above edit, transporting the lifting problem would require at least the vanishing of $H^1$ since it involves epimorphisms).
 A: There are several mistakes in your arguments, and also true facts. I'll try to list them all :


*

*$\Gamma(X,.)\simeq\operatorname{Hom}_{\mathcal{O}_X-\mathrm{mod}}(\mathcal{O}_X,.)$. This is true and does NOT require the equivalence on affine scheme. In fact, this natural isomorphism holds in any context, on any ringed space (even ringed topos)

*$H^1(X,.)=0$ so $H^i(X,.)=0$ for all $i>0$. This is true, and a general fact in homological algebra. If $F$ is a left exact functor with $R^1F=0$, then by the long exact sequence you see that $F$ is actually exact. It follows that it has no higher derived exact functor.

*If $F:\mathcal{A}\to\mathcal{B}$ is an equivalence of categories between abelian categories, then $F$ preserve $\operatorname{Ext}$. This is true and easy to prove using that an equivalence of category is exact and preserve injectives.

*It seems you make a confusion between $QCoh(X)$ and $\mathcal{O}_X-\mathrm{mod}$. We have an equivalence of category $QCoh(\operatorname{Spec}A)\simeq A-\mathrm{mod}$ but these categories are NOT equivalent to $\mathcal{O}_{\operatorname{Spec}A}-\mathrm{mod}$.

*A very subtle point in sheaf cohomology : $H^i(X,.)$ is the derived functor of $\Gamma(X,.):\mathcal{O}_X-\mathrm{mod}\to\mathcal{A}b$. It can be shown that it is also the derived functor of $\Gamma(X,.):\mathcal{A}b(X)\to\mathcal{A}b$ (where $\mathcal{A}b(X)$ is the category of abelian sheaves on $X$). But it is NOT the derived functor of $\Gamma(X,.):QCoh(X)\to\mathcal{A}b$. So this is confusing since the three functors are denoted the same way and that the inclusion functor $QCoh(X)\to\mathcal{O}_X-\mathrm{mod}$ is never written. (Note that the inclusion functor is exact ! but may not preserve injectives nor send them to flabby sheaves).

*Using 4. and 5. : on an affine scheme $X=\operatorname{Spec}A$, you have an equivalence of category $QCoh(X)\simeq A$-mod (and not $\mathcal{O}_X$-mod). The equivalence is given by $M\mapsto \tilde{M}$ in one direction and by $\mathcal{F}\mapsto \Gamma(X,\mathcal{F})$ in the other. This implies that $\Gamma(X,.)$ is exact (and so has no higher derived functor) has a functor $QCoh(X)\to\mathcal{A}b$ (and not $\mathcal{O}_X$-mod). Unfortunately, this (vanishing) derived functor is not the sheaf cohomology.
To expand a bit on 5., see this post : Godement Resolution don't see $\mathcal{O}_X$-module structure
