Note that there are some explanatory texts on larger screens.

plurals
  1. POConvert ASP.Net MVC4 site to Azure
    primarykey
    data
    text
    <p>I've created a ASP.Net MVC 4 web site that has several custom routes which are registered in the ~/App_Start/RouteConfig file. </p> <pre><code>public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Empty", url: "", defaults: new { controller = "Home", action = "Index", id = 0 } ); routes.MapRoute( name: "Session", url: "{id}", defaults: new { controller = "Home", action = "Index" } ); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } } </code></pre> <p>This site is working great outside of Azure and even works in the Azure emulator, but when I move it up to Azure, it's acting like there are no routes. For instance, when I try to navigate to the root of the web site I get an error stating:</p> <pre><code>403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. </code></pre> <p>This made me think that the route simply wasn't working so I tried going to a another page like <a href="http://myapp.cloudapp.net/1234" rel="nofollow">http://myapp.cloudapp.net/1234</a> (which should send 1234 into the home controller's index action. But that action gives me a 404 error. </p> <p>I've checked my configuration against and new ASP.Net MVC 4 Azure project and they appear to be the same. I've also read through <a href="http://blogs.msdn.com/b/jnak/archive/2010/02/08/migrating-an-existing-asp-net-app-to-run-on-windows-azure.aspx" rel="nofollow">this</a> which gave some pointers but ultimately didn't help.</p> <p>Any advice on how to troubleshoot this?</p> <p><strong>Update</strong></p> <p>This is a WebRole project and is using .Net 4.0 (I already down converted from 4.5).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload