Ampere's law and Biot-Savart law gives different terms for magnetic field in middle of a current running in a loop 
I would like if someone could clarify this issue for me:
When dealing with a current $I$ running in a loop with radius $R$ and looking for the magnetic field in the middle of the loop.
By using Ampere's law, I know that the current $I$ runs through a loop with the same radius $R$, we get that:
$$\oint_c\vec{B} \cdot d\vec{l} = \mu_0 I_{enc} $$
$$B= \frac{\mu_0 I}{2\pi R}$$
and when using Biot–Savart we get that 
$$d\vec{l} \cdot \vec{r} = |d\vec{l}||\vec{r}|\sin(\frac{\pi}{2})$$ obtaining:
$$B = \frac{\mu_0 I}{2R}$$
Which is not the same result as with Ampere's law.
I obviously miss something, maybe I can't use Ampere's law?
Anyway, if someone could help me out here I would really appreciate it.
Thanks.
 A: The Biot Savart law is
$${\bf B} =  \frac{\mu_0}{4\pi} \oint \frac{ I\, d{\bf l} \times {\bf r}}{|{\bf r}|^3}$$
In this case $d{\bf l} \times {\bf r} = dl\,|r|$ directed along the loop axis and integrating around the closed loop leads to a B-field magnitude $ B = \mu_0\, I/2R$ as you suggest.
However, I think there is a problem with your application of Ampere's law. This is that
$$ \oint {\bf B} \cdot d{\bf l} = \mu_0 I\, ,$$
where I is the current enclosed by the closed loop around which you do the line integral on the LHS.
Usually, to apply Ampere's law, you choose a loop to integrate over that has either a constant B-field, and/or with a direction that is either parallel or perpendicular to $d{\bf l}$ (so that the scalar product and/or line integral are much simplified). What loop have you done your integral around? Is the B-field constant along this path? I don't think so...
A: You probably misapplied Ampere's law. This law is usually used to find magnetic field only in special cases when the contour integral can be found as a function of single field value based on symmetry.
Magnetic field of a circular current loop is not so simple and Ampere's law cannot be easily used to find it. In such cases, the method of choice is to use the Biot-Savart law (integrate the contributions to the field due to elements of the circuit) or find vector potential as a function of position and then derive magnetic field from it.
A: Your calculation of $B$ using Ampere's Law is not correct. The integration surface should have its area perpendicular to the current and should have one of the sides go parallel to $\vec{B}$. The choice of surface, when using that form of Ampere's Law, is usually a square or rectangle. That's why using it for a single loop does not work, because $\vec{B}$ is not uniform at the center of a single loop, meaning it does not point in the same direction along a line. Ampere's Law is very useful if you want to calculate $\vec{B}$ inside a solenoid, because it is approximately uniform in this case. See this example.  
