Azure website and web API project RRS feed

  • Question

  • User-1387062836 posted

    I have created a web api project that I plan on using with my new Windows 8 application.  It works great locally!  The problem is when I have attempted to deploy it  everything seems to work but navigating to site bring up the welcome to azure nothing is here page.  I can see the files in visual studio for this website.  Does anyone have any tips?  Can I even host a web api project on a azure website?  I have also tried to use the web api itself by going to the site and hitting the calls like this "azurewebsite"/api/mycontroller/actionname  This returns a 404.  

    Thursday, April 24, 2014 4:57 PM

All replies

  • User455156504 posted


    of course you can host ASP.NET Web API on Azure Web Sites. 404 is a common problem when you're not exactly sure how the resource (URL) looks like (f.e. if you have query parameters). Have you tried to send a request via Fiddler to your API? A simple GET request is best-suited for this purpose.

    If that doesn't help it would be great if you could post your routing configuration and an example of an action in your API.

    Friday, April 25, 2014 1:46 AM
  • User-1387062836 posted

    Thanks for the response.  I have been able to create a new website on Azure and deploy a ASP.NET Web API.  I have copied over and re implemented my logic.  My issue now is that when i call the service with hard coded return values it works great, if i try to hit the azure database  it returns an empty json result.  When I run the same code locally hitting the same azure database I get my expected result.  I am not really sure why this is happening it is a simple request.

    Friday, April 25, 2014 12:57 PM
  • User1492915735 posted

    Test your connection string and see the app's log. There's default log.

    Monday, April 28, 2014 3:48 AM