This is a migrated thread and some comments may be shown as answers.

[Solved] HTTP 404 - TELERIK MVC 3 Web Application (Razor)

3 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jean-Philippe Guertin
Top achievements
Rank 1
Jean-Philippe Guertin asked on 12 May 2011, 06:14 PM
On a standard project generate from the TELERIK MVC 3 Web Application (Razor)
where everything works fine but 
If I hit the F5 key from say  About.cshtml file
I get a HTTP 404 error looking for

Requested URL: /Views/Home/About.cshtml

I don't get that on other project not using that specific template.

Any idea?

Jean-Philippe

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 13 May 2011, 07:00 AM
Hello,

This is a limitation of Visual Studio with MVC projects. It does not know about the routing used in MVC and tries to open the view by using its relative path.

You should access the About view through the configured route. The default would be:  /Home/About

I hope this helps.

Best regards,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jean-Philippe Guertin
Top achievements
Rank 1
answered on 13 May 2011, 12:09 PM
Hi,

How come I don't have that behavior on a MVC 3 project generate by the standard (not Telerik) template of Visual Studio 2010?
How come you don't have that behavior on your Telerik.Web.Mvc.Examples Project?

Regards,

Jean-Philippe
0
T. Tsonev
Telerik team
answered on 16 May 2011, 08:21 AM
Hi Jean-Philippe Guertin,

You're correct, the default MVC project template does not try to open the current view. 

The fix is simple enough - you need to set the project start action to "Specific Page" and leave the page path empty. See the attached screenshot.

Thank you for pointing this out. We'll take care to update the template.
As a token of gratitude for your involvement your Telerik points have been updated.

All the best,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Jean-Philippe Guertin
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Jean-Philippe Guertin
Top achievements
Rank 1
Share this question
or