After reinstall of node_modules.
Suddenly ionic 3 android can't approach backend.
Not azure nor localhost.
Getting "not found" type 2 exception.Without any details
No security restrictions.
At the backend
protected void Application_BeginRequest(object sender, EventArgs e)
{
//HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "http://localhost:8100");
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*");
if (HttpContext.Current.Request.HttpMethod == "OPTIONS")
{
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST");
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, Accept");
HttpContext.Current.Response.AddHeader("Access-Control-Max-Age", "1728000");
HttpContext.Current.Response.End();
}
At the config.xml of Ionic 2
<access origin="*" />
<access launch-external="yes" origin="tel:*" />
<allow-navigation href="*" />
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="data:*" />
<allow-intent href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
The full exception
"{"_body":"","status":404,"ok":false,"statusText":"Not Found","headers":{"client-via":["shouldInterceptRequest"]},"type":2, "url":"http://.../service1.svc/getCompanies"}"
How can I solve it quickly? At least to get some verbose response explaining the problem.