8

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?

5
  • The error suggests an issue with the wwwroot attribute of the project.json file. Have you confirmed that this attribute exists in your project file? Commented Dec 19, 2015 at 15:51
  • No, it does not, but I have the same file on my dev machine and here it works alright. Commented Dec 19, 2015 at 15:56
  • Are you running the project in IIS Express or full IIS on your dev machine? The error specifically states it is needed for IIS Express. Commented Dec 19, 2015 at 15:57
  • You need to point iis to the wwwroot folder instead of the root of your project. Commented Dec 19, 2015 at 16:21
  • I'm running iis express on both. Commented Dec 19, 2015 at 17:02

1 Answer 1

7

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

Sign up to request clarification or add additional context in comments.

1 Comment

One would assume that the error description would actually know what its talking about. Oh forgot, some things never change! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.