Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC 6 project not recognised as web project

I'm developing a small website and I decided to try ASP.NET MVC 6. I wrote some code on my computer and now I want to test it on the server, first in Visual Studio to debug it. I copied the whole solution folder and pasted on the server, but I cannot run the project. VS complains:

enter image description here The selected debug option is IIS Express but this project is not a web project. To use IIS Express you need to add the wwwroot attribute to project.json.

Google returns nothing for the error message, which is always a bad sign. Apparently there's a problem with the wwwroot folder, but I don't understand what it's trying to tell me. Note that the wwwroot in the solution explorer is displayed as a normal folder (as opposed to the globe icon I have on my dev machine).

I created the project from the template and everything was working out of the box. Did I miss something when copying the project?

like image 928
Emmit Avatar asked Dec 19 '15 15:12

Emmit


People also ask

Are MVC and Web API into one in MVC 6?

ASP.NET MVC 6 is a Cross-Platform and Compatible Framework; the essential thing in this framework is it builds the frameworks into a single one by merging the frameworks of WebPages, MVC, and Web API. Moreover, it is rich in developing Web Apps and APIs using Model-View-Controller design patterns.

How do I open MVC project in browser?

To do this, right click on your mvc project, choose Properties , then select the Web tab and then in the right pane, select Specific Page and enter the url say " Home/Index ".

When should you use .NET Web Forms Over ASP.NET MVC?

Asp.Net Web Form has built-in data controls and best for rapid development with powerful data access. Asp.Net MVC is lightweight, provide full control over markup and support many features that allow fast & agile development. Hence it is best for developing an interactive web application with the latest web standards.


1 Answers

Found it. It turns out that ASP.NET 5 runtime was not installed at the server.

like image 165
Emmit Avatar answered Sep 19 '22 18:09

Emmit