API problem after doing deploy

0

My api is not working after deploy to the server, it is returning:

  

404 - File or directory not found.     

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

By doing some tests, I discovered the following:

link

But if I do it right:

link

Why is it okay when I put api twice? I was not able to do this in code, apply api twice in route.

    
asked by anonymous 23.05.2018 / 23:36

1 answer

1

What happened:

You've created an application within your site (probably Default Web Site ). This creates an alias (In your case api ) and to access your application you must have the alias in the URL occurs regardless of whether it is a api or a web project), example: link alias / api / route

Howtoresolve:

YoucanpublishyourapitoDefaultorcreateasiteforapi,soyouwillnolongerhavetopassthealias,intheimageexample,Icreatedanewsite(rightclickonSites>Addsite)

Possible"problem":

When creating websites, each one will be in a port, so if you happen to have an application web and a api published, each site will have a port

    
24.05.2018 / 01:34