0

I have an MVC3 project using nHibernate, Rhino and Castle. I finally got all of the components in place. I think. At least it runs and invokes the IWondsorContainer CreateContainer() method....after that method, the Application_Start does not fire and I get the message:

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/Proposal/Index.cshtml

Any ideas? I don't know what to make of this. Thanks

4
  • Try going to the url /proposal/index. The above error suggests that you are trying to go directly to the View without passing through routing and the controller. Commented Oct 4, 2011 at 18:44
  • @Charlino...I still get the same result when I use /proposal/index or /....ideas? Commented Oct 4, 2011 at 21:22
  • You get the same result, as in you get the same error page complaining about the resource not being found? Commented Oct 5, 2011 at 0:21
  • @Charlino...same result as before Commented Oct 5, 2011 at 14:20

1 Answer 1

2

You seem to be requesting a view directly: /Views/Proposal/Index.cshtml. In ASP.NET MVC you do not request a view. You request a controller action. So in your browser the url should be /Proposal/Index or simply / depending on how your routes are configured.

I suspect that you had the focus on this Index.cshtml when you hit F5 in Visual Studio which has this ugly habit of following the url. You could define a start url in the properties of your web project to avoid this behavior.

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

3 Comments

OK, cool....I tried to set the property in the project but it didn't like Proposal/Index as the specific URL. What should it be?
@MikeTWebb, what it didn't like about Proposal/Index?
@Darin...same result. 404 page not found

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.