in asp.net web forms application have added folder @ root level "webapi" have web api controller , authenticate token. asp.net web format application have form authentication. when call api rest client redirect login page.
api response:-
<html><head><title>object moved</title></head><body> <h2>object moved <a href="/login/default.aspx? returnurl=%2fapi%2fcustomer%2fgetsmscount">here</a>.</h2> </body></html>
root level web.config:-
<location path="webapi"> <system.web> <authorization> <allow users="?"/> </authorization> </system.web> </location> <system.web><authorization> <deny users="?" /></authorization> </system.web>
i have given access anonymous on webapi folder still redirecting login page.
check whether u given correct path of api