views:

34

answers:

1

I have created a sample project using ASP.NET MVC 3 Web Application (Razor) template. When I run my application I get this error

 'SampleApp.MvcApplication' is not allowed here because it does not extend class 'Microsoft.WebPages.WebPageHttpApplication'

Where should i look for the problem?

+3  A: 

It looks to me like you have both MVC 3 Preview 1 and WebMatrix Beta installed. Unfortunately those 2 don't play nicely together. If that is not the case let me know and we can troubleshoot further.

marcind
@marcind I didn't find `Microsoft.WebPages.WebPageHttpApplication` class. Is there any other assembly i need to add reference to?
ajay_whiz
@ajay_whiz Actually now that I think about it it looks like you are mixing MVC 3 Preview 1 with the WebMatrix Beta. Those two don't play along very well which is why you are seeing this error. I'll update my response.
marcind
@marcind yes I have both of them installed on my machine
ajay_whiz