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:
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?
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.
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 ".
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.
Found it. It turns out that ASP.NET 5 runtime was not installed at the server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With