La aplicación MVC4 en Azure no funciona

I am deploying a ASP.NET MVC4 to Azure web site for the first time.


  • Visual Studio 2013 Profesional Actualización 1
  • .NET 4
  • usando maquinilla de afeitar
  • IIS7

He descargado publicar perfil and have imported in Publish settings. Build is successful so is deploy.

When I go to home page i.e. Yo obtengo: This web site has been successfully created mensaje.

When I try going to /Cuenta de Ingreso => I get 404.

Cuando corro /prueba.aspx (this is page I have added to project for testing) it executes and returns the page output.

I had same issue when I tried deploying MVC application to IIS6, where extensionless path was not handled so I had to enable wildcard handler.

How to resolve MVC issue on Azure?

actualización 1

I have created a new ASP.NET MVC 4 project (Razor) using .NET 4.5. I have installed latest Azure SDK for Visual Studio 2013. So, this is empty project created from Visual Studio template, I have not did any further adjustments and it works on local IIS. I did a deploy according to Documentación de Azure.


preguntado el 28 de mayo de 14 a las 13:05

I had similar kind of issue, I was not able to deploy my site on Azure using Publish Profile, but its good that you are able to deploy. The solution I opted was to publish and deploy it on local IIS first and than using Dropbox deploy it on Azure. That worked for me and my site works nicely. (I was using the same technology you are using for your website). Try it, if that helps. -

2 Respuestas

Encontré el problema.

Tuve "Precompilar durante la publicación"registrado"Opciones de publicación de archivos". It was generating PrecompiledApp.config and Global.asax was missing.

Cuando tengo desenfrenado "Precompilar durante la publicación" option, everything was fine.

Respondido el 08 de junio de 14 a las 12:06

Oh, ya that is not checked by default. - user2038230

I think you need to change your routes in RouteConfig.cs . I see you are trying /test.aspx , but I would try a restful folder. Look in your Controllers folder.

for example if you see:


Then I would try

I see you are trying Account/Login I would NOT do this to troubleshoot as you just may have added complexity to your problem with AUTH...

Your routes are definitely needing to be looked at. Also locally you may want to run on IIS Express or your local IIS etc... and test different controllers. The tweaking of your routes can easily cause the Account/Login to show this error locally The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_Layout.cshtml": "Scripts".

And then on publishing,... the 404 --> "An error occurred while processing your request." etc..

I like to use Visual Studio Publish, just install the azure sdk for vs 2013 etc..

contestado el 29 de mayo de 14 a las 07:05

No hay Home controller. Whole webapp is behind login. That is why I am trying /Account/Login as it is only public View. Application works on local IIS. I use Visual Studio publish with publish profile I have downloaded from Azure Web Site page. I have also connected over FTP to check if it is deployed and it is. - Andrija

Hmm. That is odd. I will try to figure it out - tom stickel

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.