user1960836
user1960836

Reputation: 1782

Getting a url not found

When I start my project in VS13 it tries to navigate to:

http://localhost:3918/Views/Home/Index.cshtml

Here it reports: Server Error in '/' Application and says the resource cannot be found.

I have to manually delete: Views/Home/Index.cshtml in the url, so that it only says: http://localhost:3918. Then it will work. How can I go about this? I have tried to click on the entire WebApplication, and said "Set as startUp project", and I have also tried to set the index.cshtml as startup, but nothing works.

This url: /Views/Home/Index.cshtml actually does exist, even though it says that it doesn't. What am I doing wrong? Thanks in advance

Upvotes: 0

Views: 96

Answers (1)

SBirthare
SBirthare

Reputation: 5137

You have set a specific page to run hence VS is loading it as static file.

Go to project properties > Web > Change to Current Page.

What you have got:

wrong option

What you should have:

enter image description here

Upvotes: 1

Related Questions