Unpublish MVC 4 project from Azure website

I created a new website in Windows Azure and there I deployed a standard MVC 4 project using an internet application template. I think I may have made some mistakes in NuGet packages while trying to solve another problem. I created a new project and published it using the same publishing profile. Now I get this error:

* Several types were found that correspond to the controller named "Home". This can happen if the route serving this request ( '{controller}/{action}/{id}' ) does not specify a namespace for finding the controller that matches the request. If so, register this route by overloading the MapRoute method, which accepts the namespaces parameter.

The following matching controllers were found in the query "Home": MyCoolWebsite.Controllers.HomeController NewWebsite.Controllers.HomeController *

Obviously, now two projects coexist and create problems in an understandable way. How can I reset an old project without deleting and re-creating the entire site on Azure? I searched everything around the portal, even in the old version, but found nothing. As far as I can see, it is not even possible to see what is installed on the website on the management portal.

+4
source share
2 answers

When publishing from Visual Studio, you can delete the destination files before publishing. Should help you if you have not decided yet. :)

dialog box

+3
source

There are several ways to manage content in your Azure Web App other than publishing, including FTP, Kudu, and various APIs.

The easiest way is probably through Kudu. Go to https://<yourwebapp>.scm.azurewebsites.net and open the debug console (wither CMD or Powershell will work). You can use commands like rmdir or just browse the file tree displayed in the browser window and click the delete icon in the folder you want to delete.

Screenshot Kudu

+1
source

Source: https://habr.com/ru/post/1437956/


All Articles