0

I'm trying to make a MVC 2 web application for a small portal. I started with the template in VS 2010 and made several other .aspx pages (for views) Index.aspx (was a part of the template) opens like he should open, but when I click on a link to acces another aspx page (that I added to the template) he show me this:

Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Views/AccountPages/Aanvragen.aspx

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

When I set Aanvragen.aspx as startup page, he show me the same message. I use a built in server (VS2010). Of course, I checked if the url is correct and it is. So that is certaintly not the problem

Anyone that could help me ?

Thanks a lot

1
  • I agree with @Andrew Barber. If you're requesting aspx pages directly, like with ASP.NET Web Forms, then you're doing it wrong. ASP.NET MVC uses routing. Commented Dec 14, 2010 at 19:59

1 Answer 1

1

You should not be requesting view pages directly at all; the web.config that comes with ASP.NET MVC blocks direct requests for all views in the /views directory, for one thing.

You can link to regular web forms pages elsewhere in your site, such as in the root directory, but that's really not how MVC is meant to be used. You may want to seek out a tutorial on ASP.NET MVC, as it seems you aren't familiar with how to use it. Check out the http://www.asp.net/mvc web site.

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

1 Comment

thanks, I followed the tutorial about the music store and now I understand how MVC works.

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.