asp.net-mvc-3-beta

Why does the generated NinjectMVC3.cs from NuPack not compile? (or what happened to MvcServiceLocator in ASP.NET MVC 3 Beta? )

Using the NuPack addin and installing the NInject MVC 3 package results in the following compile error in the generated NinjectMVC3.cs file. The name 'MvcServiceLocator' does not exist in the current context The sample video David Ebbo posted shows it working just fine at 09:43. Here is the currently generated class: public class Nin...

ASP.NET MVC Beta Authorize attribute sends me to wrong action

Today I started playing with the MVC 3 Beta. Started with an application from default MVC 3 template, added a new action in the Home controller as follows(with a view for it) [Authorize] public ActionResult Secured() { ViewModel.Message = "This is secured area, only authenticated users should be here."; return View(); } Now wh...

ASP.NET MVC 3 Beta 1 Block Access to Razor views

Is there a way to block access (404) to the Razor views in MVC 3 beta 1? When I create a brand new blank site (IIS7) and then access /views/home/index.cshtml from the browser, instead of the 404 I get this [InvalidCastException: Unable to cast object of type 'ASP.Index_cshtml' to type 'System.Web.IHttpHandler'.] System.Web.WebPag...

Asp.net MVC Razor - Custom javascript inside if block

How can I put javascript code inside if block. @{ #if DEBUG $("#User").val("JDoe"); $("#Password").val("secrect"); #endif } When I try above code I get this compiler error: Compiler Error Message: CS1056: Unexpected character '$' And if I change $ to jQuery: Compiler Error Message: CS0103: The name 'jQuery' does no...

ASP.NET MVC 3 in production?

Now that ASP.NET MVC 3 is in beta, and ready for "go-live". Would it be safe to use in project, although not prevented I am curious on security, performance and ease of upgrade to release version. ...

Form submitted twice after updating from ASP MVC 3 Preview to Beta

After upgrading my ASP MVC from 3 Preview to 3 Beta I see strange behaviour in my Ajax forms. @using(Ajax.BeginForm("New", new AjaxOptions() {OnSuccess = "onAjaxSuccess", OnFailure = "onAjaxFailure", OnBegin = "onAjaxBegin", HttpMethod = "Post"})) {} <form action="/Order/New" data-ajax="true" data-ajax-begin="onAjaxBegin" data-ajax-fai...