ASP.NET MVC 1.0 Release Candidate Now Available

Today we shipped the ASP.NET MVC 1.0 Release Candidate (RC).  Click here to download it (note: the link just went live so if it isn’t working wait a few minutes for the server you are hitting to refresh).  It works with both Visual Studio 2008 and Visual Web Developer 2008 (which is free).

Today’s RC is the last public release of ASP.NET MVC that we’ll ship prior to the final “1.0” release.  We expect to ship the final ASP.NET MVC 1.0 release next month.

In addition to bug fixes, today’s build includes several new features.  It also includes some refinements to existing features based on customer feedback.  Please read the release notes that ship with the ASP.NET MVC download for full details on all changes.  The release notes include detailed instructions on how to upgrade existing applications built with the ASP.NET MVC Beta to the RC.

Visual Studio Tooling Improvements

The RC includes several new Visual Studio tooling features (above and beyond the existing support in the beta – which I won’t cover here).  These features include:

Add Controller Command

You can now type Ctrl-M, Ctrl-C within an ASP.NET MVC project, or right-click on the /Controller folder and choose the “Add->Controller” context menu item to create new controller classes:

This will cause an “Add Controller” dialog to appear that allows you to name the Controller to create, as well as optionally indicate whether you wish to automatically “scaffold” common CRUD methods:

Clicking the “Add” button will cause the controller class to be created and added to the project:

Add View Command

You can now type Ctrl-M, Ctrl-V within a Controller action method, or right-click within an action method and choose the “Add View” context menu item to create new view templates:

This will cause an “Add View” dialog to appear that allows you to name and create a new view (it is pre-populated with convention-based options).  It allows you to create “empty” view templates, or automatically generate/scaffold view templates that are based on the type of object passed to the view by the Controller action method.  The scaffolding infrastructure uses reflection when creating view templates – so it can scaffold new templates based on any POCO (plain old CLR object) passed to it.  It does not have a dependency on any particular ORM or data implementation.

For example, below we are indicating that we want to scaffold a “List” view template based on the sequence of Product objects we are passing from our action method above:

Clicking the “Add” button will cause a view template to be created for us within the \Views\Products\ directory with a default “scaffold” implementation:

We can then run our application and request the /products URL within our browser to see a listing of our retrieved products:

The RC ships with a number of built-in scaffold templates: “Empty”, “List”, “Details”, “Edit” and “Create” (you can also add your own scaffold templates – more details on this in a moment). 

For example, to enable product editing support we can implement the HTTP-GET version of our “Edit” action method on our Products controller like below and then invoke the “Add View” command:

Within the “Add View” dialog we can indicate we are passing a “Product” object to our view and choose the “Edit” template option to scaffold it:

Clicking the “Add” button will cause an edit view template to be created with a default scaffold implementation within the \Views\Products\ directory:

We can then run our application and request the /products/edit/1 URL within our browser to edit the Product details:

To save edit changes we can implement the HTTP-POST version of our “Edit” action method on our Products controller:

Notice in the code above how in the case of an error (for example: someone enters a bogus string for a number value) we redisplay the view.  The “edit” and “create” scaffold templates contain the HTML validation helper methods necessary to preserve user input and flag invalid input elements in red when this happens:

You’ll rarely end up using a scaffold-created template exactly as-is, and often will end up completely replacing it.  But being able to get an initial implementation up and running quickly, and having an initial view template for your scenario that you can then easily tweak is really useful.

Because the scaffold infrastructure supports scaffolding views against any plain-old CLR object, you can use it with both domain model objects (including those mapped with LINQ to SQL, LINQ to Entities, nHibernate, LLBLGen Pro, SubSonic, and other popular ORM implementations) as well as to create scaffolds with custom Presentation Model/ViewModel classes.

Adding and Customizing Scaffold Templates

ASP.NET MVC’s scaffolding infrastructure is implemented using Visual Studio’s built-in T4 templating architecture (Scott Hanselman has a nice blog post on T4 here). 

You can customize/override any of the built-in ASP.NET MVC scaffold template implementations.  You can also create additional scaffold templates (for example: the “ScottGu Crazy Look” scaffold option) and have them be displayed as options within the “Add View” dialog.

To customize/add scaffold templates at the machine-wide level, open the “C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC\CodeTemplates” folder:

The “AddController” sub-folder contains the scaffold template for the “Add Controller” dialog.  The “AddView” sub-folder contains the scaffold templates for the “Add View” dialog:

The scaffold templates populated within the “Add View” dialog are simply text files that have the “.tt” file-name extension.  These “.tt” text files contain inline C# or VB code that executes when the template is selected. 

You can open and edit any of the existing files to customize the default scaffolding behavior.  You can also add new “.tt” template files – like I have above with the “Scott Crazy Look.tt” file.  When you add a new template file the “Add View” dialog will be updated to automatically include it in the list of available scaffold options:

In addition to customizing/adding template files at the machine level, you can also add/override them at the individual project level.  This also enables you to check-in the templates under source control and easily use them across a team.

You can customize the scaffold templates at a project level by adding a “CodeTemplates” folder underneath your project.  You can then have “AddController” and “AddView” sub-folders within it:

You can override any of the default machine-wide templates simply be adding a “.tt” file with the same name to the project.  For example, above we are overriding the default “Controller.tt” scaffold template used in “Add Controller” scenarios. 

You can add new view-template scaffold files to the list by placing them within the “AddView” folder.  For example, above we added a “Yet Another Crazy Look.tt” view template to our project.  When we use the “Add View” dialog we’ll now see a union of the templates defined at the machine and project level:

Note: When you add “.tt” templates under the \CodeTemplates folder make sure to set the “Custom Tool” property of each of the “.tt” template files to an empty string value within the property grid (otherwise you’ll get an error trying to run it).  You might also need to close and reopen the project to clear a spurious error from the error list.  We’ll be publishing more blog posts that cover creating/customizing scaffolding templates shortly.

Go To Controller / Go To View

The RC build now supports the ability to quickly navigate between the Controllers and Views within your projects. 

When your cursor is within a Controller action method you can type Ctrl-M, Ctrl-G to quickly navigate to its corresponding view template.  You can also perform this same navigation jump by right-clicking within the action method and selecting the “Go To View” menu option:

In the example above we used the “Go To View” command within the “Edit” action method of the ProductsController class.  This will cause the \Views\Products\Edit.aspx view template to be opened and have the default focus within VS:

Within view templates you can also now type Ctrl-M, Ctrl-G to quickly navigate to the view’s corresponding Controller class.  You can also perform this navigation jump by right-clicking within the view template and selecting the “Go To Controller” menu option:

MSBuild Task for Compiling Views

By default when you do a build on an ASP.NET MVC project it compiles all code within the project, except for the code within view template files.  With the ASP.NET MVC Beta you had to roll your own MSBuild task if you wanted to compile the code within view templates.  The ASP.NET MVC RC build now includes a built-in MSBuild task that you can use to include views as part of the project compilation process.  This will verify the syntax and code included inline within all views, master pages, and partial views for the application, and give you build errors if it encounters any problems.

For performance reasons we don't recommend running this for quick compiles during development, but it is convenient to add to particular build configuration profiles (for example: staging and deployment) and/or for use with Build or CI (continuous integration) servers.  Please review the release notes for the steps to enable this.

View Refactoring Support

The names of the files and folders under the \Views application sub-folder will now automatically be updated when you perform controller class rename or action method rename using the “Rename” refactoring command in VS 2008.  VS 2008 will apply the standard convention-based naming pattern to existing view files/folders when the Controller class is updated.

View Improvements

The RC build includes a number of view-specific enhancements that were incorporated based on feedback during the preview releases.

Views without Code-Behind Files

Based on feedback we’ve changed view-templates to not have a code-behind file by default.  This change helps reinforce the purpose of views in a MVC application (which are intended to be purely about rendering and to not contain any non-rendering related code), and for most people eliminates unused files in the project.

The RC build now adds C# and VB syntax support for inheriting view templates from base classes that use generics.  For example, below we are using this with the Edit.aspx view template – whose “inherits” attribute derives from the ViewPage<Product> type:

One nice benefit of not using a code-behind file is that you'll now get immediate intellisense within view template files when you add them to the project.  With previous builds you had to do a build/compile immediately after creating a view in order to get code intellisense within it.  The RC makes the workflow of adding and immediately editing a view compile-free and much more seamless.

Important: If you are upgrading a ASP.NET MVC project that was created with an earlier build make sure to follow the steps in the release notes – the web.config file under the \Views directory needs to be updated with some settings in order for the above generics based syntax to work.

Model Property

With previous builds of ASP.NET MVC, you accessed the strongly typed model object passed to the view using the ViewData.Model property:

The above syntax still works, although now there is also a top-level "Model" property on ViewPage that you can also use:

This property does the same thing as the previous code sample - its main benefit is that it allows you to write the code a little more concisely.  It also allows you to avoid using the ViewData dictionary in cases where you want the view template to only interact with the strongly-typed model passed to it.

Setting the Title

The default master-page template added to new ASP.NET MVC projects now has an <asp:contentplaceholder/> element within its <head> section.  This makes it much easier for view templates to control the <title> element of the HTML page rendered back – and not require the Controller to explicitly pass a “title” parameter to configure it (which was the default with previous ASP.NET MVC builds and we thought questionable from a responsibilities perspective). 

For example, to customize the <title> of our Edit view to include the current product name we can now add the below code to our Edit.aspx template to drive the title directly off of the model object being passed the view:

The above code will then cause the browser to render the title using the Product name at runtime:

In addition to setting the <title> element, you can also use the above approach to dynamically add other <head> elements at runtime.  Another common scenario this is useful with is configuring model/view specific <meta/> elements for search engine optimization. 

Strongly Typed HTML/AJAX Helpers

One of the requests a few people have asked for is the ability to use strongly-typed expression syntax (instead of strings) when referring to the Model when using a View's HTML and AJAX helper objects.

With the beta build of ASP.NET MVC this wasn't possible, since the HtmlHelper and AjaxHelper helper classes didn't expose the model type in their signature, and so people had to build helper methods directly off of the ViewPage<TModel> base class in order to achieve this. 

The ASP.NET MVC RC build introduces new HtmlHelper<TModel> and AjaxHelper<TModel> types that are exposed on the ViewPage<TModel> base class.  These types now allow anyone to build strongly-typed HTML and AJAX helper extensions that use expression syntax to refer to the View's model.  For example:

The HTML form helper extension methods in the core ASP.NET MVC V1 assembly still use the non-expression based string syntax.  The “MVC Futures” assembly released today (which works with the RC) has a few initial implementations of expression-syntax based form helper methods.   We are going to iterate on these a bit longer and then consider adding them into the ASP.NET MVC core assembly in the next release. 

You can of course also add your own helper methods (using either strings or strongly-typed expressions).  The built-in HTML/AJAX helper methods can also optionally be removed (because they are extension methods) if you want to replace or override them with your own

Form Post Improvements

The RC build includes a number of form-post specific enhancements:

[Bind(Prefix=””)] No Longer Required for Common Scenarios

The RC build no longer requires you to explicitly use a [Bind] attribute (or set its prefix value to “”) in order to map incoming form post parameters that do not have a prefix to complex action method parameters.

To see what this means, let’s implement the “Create” scenario for our ProductsController.  We’ll begin by implementing the HTTP-GET version of our “Create” action method.  We’ll do this with code below that returns a View based on an empty Product object:

We can then right-click within our action method, choose the “Add View” command and scaffold a “create” view template that is based on a Product:

Notice above how our Html.TextBox() helper methods are referencing the “ProductName” and “SupplierID” properties on our Product object.  This will generate HTML markup like below where the input “name” attributes are “ProductName” and “SupplierID”:

We can then implement the HTTP-POST version of our “Create” action method. We’ll have our action method take a Product object as a method parameter:

With the ASP.NET MVC Beta we would have had to add a [Bind(Prefix=””)] attribute in front of our Product argument above – otherwise the ASP.NET MVC binding infrastructure would have only looked for form post values with a “productToCreate.” prefix (for example: productToCreate.ProductName and productToCreate.SupplierID) and not found the submitted values from our form (which don’t have a prefix). 

With the RC build, the default action method binders still first attempt to map a productToCreate.ProductName form value to the Product object.  If they don’t find such a value, though, they now also attempt to map “ProductName” to the Product object.  This makes scenarios where you pass in complex objects to an action method syntactically cleaner and less verbose.  You can take advantage of this feature both when mapping domain objects (like our Product object above) as well as with Presentation Model/ViewModel classes (like a ProductViewModel class).

A completed implementation of our Create action method (including basic input type error handling) might look like below:

Now our create action will save the Product object if all values are entered correctly.  When a user attempts to create a Product with invalid Product property values (for example: a string “Bogus” instead of a valid Decimal value), the form will redisplay and flag the invalid input elements in red:

ModelBinder API Improvements

The model binding infrastructure within the ASP.NET MVC Release Candidate has been refactored to add additional extensibility points to enable custom binding and validation schemes.  You can read more about these details in the ASP.NET MVC RC release notes.

Model Binders can also now be registered for interfaces in addition to classes. 

IDataErrorInfo Support

The default model binder with ASP.NET MVC now supports classes that implement the IDataErrorInfo interface.  This enables a common approach to raise validation error messages in a way that can be shared across Windows Forms, WPF and now ASP.NET MVC applications.

Unit Testing Improvements

The ASP.NET MVC RC includes some significant improvements to unit testing:

ControllerContext changed to no longer derive from RequestContext

The RC build includes a refactoring of the ControllerContext class that significantly simplifies common unit testing scenarios.  The ControllerContext class no longer derives from RequestContext and now instead encapsulates RequestContext and exposes it as a property.  The properties of ControllerContext and its derived types are also now virtual instead of sealed – making it significantly easier to create mock objects.

To see how this helps, let’s consider an action method like below that uses both the “Request” and “User” intrinsic objects:

Testing the above action method with previous ASP.NET MVC builds would have required mocking RequestContext and ControllerContext (with some non-obvious constructors that also brought in a RouteData object).

With the RC build we can now unit test it like below (using Moq to mock a ControllerContext for our Controller that allows us to simulate the Request.IsAuthenticated and User.Identity.Name properties):

The refactoring improvements made help out not just with testing Controller actions – but also help with testing filters, routes, custom actionresult types, and a variety of other scenarios.

AccountsController Unit Tests

The ASP.NET MVC Project Template included with the RC build now adds 25 pre-built unit tests that verify the behavior of the AccountsController class (which is a controller added to the project by default to handle login and account management scenarios).  This makes refactoring/updating AccountsController easier.  The AccountsController implementation has also been modified to more easily enable non-Membership Provider based credential systems to be integrated.

Cross Site Request Forgery (CSRF) Protection

Cross-site request forgery (CSRF) attacks (also referred to as XSRF attacks) cause users of a trusted browser agent to take unintended actions on a site.  These attacks rely on the fact that a user might still be logged in to another site.  A malicious Web site exploits this by creating a request to the original site (for example: by linking to a URL on the site using a <img src=””/> element on the hacker site). The request is made using the user’s browser and thus with the user’s authentication token and credentials. The attacker hopes that the user’s authentication or session cookie is still valid and if so, the attacker can sometimes take disruptive action.  You can learn more about this hacking technique here.

The ASP.NET MVC RC now includes some built-in CSRF protection helpers that can help mitigate CSRF attacks.  For example, you can now use the Html.AntiForgeryToken() helper to render a hidden input token within forms:

This helper issues a HTTP cookie and renders a hidden input element into our form.  Malicious web-sites will not be able to access both values.

We can then apply a new [ValidateAntiForgeryToken] attribute onto any action method we want to protect:

This will check for the existence of the appropriate tokens, and prevent our HTTP-POST action method from running if they don’t match (reducing the chance of a successful CSRF attack).

File Handling Improvements

The ASP.NET MVC RC includes a number of file handling enhancements:

FileResult and File() helper method

The RC build adds a new FileResult class that is used to indicate that a file is being returned as an ActionResult from a Controller action method.  The Controller base class also now has a set of File() helper methods that make it easy to create and return a FileResult.

For example, let’s assume we are trying to build a photo management site.  We could define a simple “Photo” class like below that encapsulates the details about a stored Photo:

We could then use the new File() helper method like below to implement a “DisplayPhoto” action method on a PhotoManager controller that could be used to render the Photo out of a database store.  In the code below we are passing the File() helper the bytes to render, as well as the mime-type of the file. If we pointed a <img src=””/> element at our action method URL the browser would display the photo inline within a page:

If we wanted an end-user to be able to download the photo and save it locally, we could implement a “DownloadPhoto” action method like below.  In the code below we are passing a third parameter – which will cause ASP.NET MVC to set a header that causes the browser to display a “Save As…” dialog which is pre-populated with the filename we’ve supplied:

When a user clicks a link to the /PhotoManager/DowloadPhoto/1232 URL they’ll be prompted to save the picture:

File Uploading Support

The RC build also includes built-in model-binder support for uploaded files and multi-part mime content. 

For example, we could have a <form> whose enctype attribute is set to “multipart/form-data” perform a post to the /PhotoManager/UploadPhoto URL.  If a <input type=”file” name=”fileToUpload”/> element was within the form it would cause the file selected by the end-user to be passed to our action method as an HttpPostedFileBase object:

We could then use the HttpPostedFileBase object to get access to the raw bytes of the uploaded file, its mime-type, and optionally save it to a database or disk.

AJAX Improvements

The ASP.NET MVC RC includes a number of AJAX enhancements:

jQuery Intellisense Files included within ASP.NET MVC Project Template

Newly created ASP.NET MVC projects now include both the standard jQuery library (both full and compressed versions), as well as the –vsdoc intellisense documentation file used by Visual Studio to provide richer intellisense support for it (you can learn more about this here):

This enables rich jQuery JavaScript intellisense within client-script blocks and JavaScript files:

Today’s RC build ships jQuery 1.2.6.  We are planning to ship the upcoming jQuery 1.3.1 release for the final ASP.NET MVC 1.0 release, and will include an updated JavaScript intellisense file for it. 

Request.IsAjaxRequest Property

The Request.IsAjaxRequest property can be used to detect whether a request is being sent from an AJAX call on the client (and is useful for scenarios where you want to gracefully degrade if AJAX is not enabled).  The logic within this method was updated with the RC to now recognize the “X-Requested-With” HTTP header (in addition to the form field sent by ASP.NET AJAX).  This is a well known header sent by JavaScript libraries such a Prototype, jQuery, and Dojo – and now enables a unified way to check for AJAX within an ASP.NET MVC request. 

JavaScriptResult ActionResult and JavaScript() helper method

The Controller base class now has a JavaScript() helper method that returns a new ActionResult class of type JavaScriptResult.  This supports the ability to return raw JavaScript that will then be executed on the client by the built-in ASP.NET MVC helper methods.  This can be useful for scenarios where you want to cause conditional JavaScript to execute on the client based on server logic.

Summary

We are pretty excited to be in the final “home stretch” of ASP.NET MVC V1.  Please report any issues you find with the RC build as soon as possible so that we can get them resolved for the final release.  The team plans to carefully monitor feedback over the next few weeks, and assuming no big issues come up ship the official V1 build next month.

Hope this helps,

Scott

Published Tuesday, January 27, 2009 12:13 PM by ScottGu
Filed under: , , ,

Comments

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:23 PM by Miguel Saez

That´s great news! Lots of customers had been asking for this.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:30 PM by Jose Rolando Guay Paz

Awesome!!

Thanks Scott. Can't wait for the final release.

Jose Guay

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:35 PM by Mahdi Taghizadeh

Great! We are waiting for v1.0.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:35 PM by Stefan K

Very excited! Thanks for all of the hard work!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:39 PM by ShipItOnTheSide.com

This really is great news. We've been working holding off on a CMS project for months waiting for the release.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:45 PM by Steve Robbins

Holy long post Batman!

Awesome news.. been waiting for this since your teaser a few weeks back :-)

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:52 PM by Syed Ahmed

Thanks Scott eagerly waiting for the final release...

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:55 PM by Barry Dahlberg

Great news.  Will there be an official release of "Scott Crazy Look"?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 3:58 PM by Danny

Scott,

Thanks to you and your entire team.  

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:00 PM by developmentalmadness

Your timing couldn't be more perfect. Just got the go ahead yesterday to use MVC in a new project we're ramping up for right now.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:06 PM by AlfeG

Thank Scott for this info. ASP.nET MVC Is the Best

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:07 PM by Troy DeMonbreun

Awesome set of improvements!  Thanks Scott & ASP.NET MVC team!

Kudos for the Act, Arrange, Assert comments included in the Mocking sample.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:18 PM by Erik

Awesome, grats on the RC release. =)

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:22 PM by MikeEast

It really looks nice!

It's been a very interesting journey from Preview 1 to this RC1.

Tonight will be the 7th update of my MVC demo site, but I think I will enjoy it alot this time.

Thanks for an excellent job!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:34 PM by Xtek

thanks guys!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:34 PM by Steve Smith

Congrats Scott, Phil, et al!  It's definitely a very impressive set of features over the Beta.  Can't wait for the final release!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:34 PM by huey

I wish I had been following ASP.NET MVC since it started.  I've only been along for the side since Preview 4, but want to say that the development and community interaction (via blogs such as this and many others by MS employees) has been phenomenal and a model I wish all other MS projects followed.  Thanks again!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:35 PM by pierslawson

Great news... except now I have to update all my example code ;-) shouldersofgiants.co.uk/Blog

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:45 PM by Josh Hurley

Impressive release, you and your team has worked hard on this one. One question I have, do you have a strategy to protect against CSRF GET, opposed to POST attacks? Or is your advice to follow HTTP standards and use GET requests exclusively for read-only actions?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:46 PM by James Clarke

Scott.. is the RC compatible with Windows Azure out of the box?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:54 PM by Yvan

Congrats to you and your Team!

A quick question, is there some guidance available on how I could "interface" this with a regular ASP.Net Web application?

Just a kind of scenario where I could have the best of both worlds i.e. some pages view viewstate and regular controls and some other with the power of MVC routing for example.

Also, in a future post, it would good to highlight pros and cons of each technology...

Thanks, and keep it up!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 4:58 PM by Patterns & Practices Guidance

Fantastic! I think the new enhancements will go along way to getting more developers interested in the MVC Framework.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 5:04 PM by zmarji

Very good, I had just downloaded beta yesterday so this makes life so much easier now. going to recreate my project now.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 5:06 PM by Rik Hemsley

Great, but new features in a release candidate?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 5:28 PM by Sam Gentile

Great news but the Beta refuses to uninstall, at least on Windows 7. "There is a problem with this Windows installer package. A program run as part of the setup did not finish as expected."

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 5:31 PM by Maciej Olesiński

Hey Scott,

I am pretty sure RC introduced a bug in UrlHelper url generation code when working with ajax calls, because it tries to convert virtual path to client url by using async request path, which might be different (usually is, if executed action is on different controller) than original view path. This results with generated url strings being relative to async request path, not the original referer path, which renders them invalid in view that requested async operation.

Shouldnt url generation code take into consideration, if its executed as async request and not convert virtual path to client url for such requests?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 5:38 PM by temebele

Great. Now it means I don't have to go to production with a Beta version.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 5:49 PM by Graham

You know what irritates me, ping backs in comments.

But on topic, everyone on the ASP.NET MVC team, great job!

Shouldn't the CSRF check be included as standard though? (I suppose intranet sites would not need it) I would love to see the ability for this to be set in your Web.config, this would eleviate the need for a Html.AntiForgeryToken() reference on every page and the Validate command, which is extra code if you know you want all your pages using it.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 5:56 PM by sam munkes

Anyone else getting a Error while installing the RC?

Error in devend.exe

Exeption: Access Violation

Breaks at the current line of devenv.exe:

retval = (size_t)HeapSize(_crtheap, 0, pblock);

Help anyone?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 5:59 PM by Sean M

Awesome timing - I'm just wrapping up a project I've been building on beta, and really been waiting for RC for stuff like no-codebehind views etc

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 6:09 PM by Vitor Canova

Great Scott. And I saw you using Windows 7 (there is a Send Feedback message on window).

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 6:21 PM by Jim

Has there been any additional functionality added to streamline passing data to MasterViewPages?  For example, say you wanted to display an html menu using data from the database.  This would need to be queried on every action.  I've read about doing this in one place with a basecontroller class but it seems like there might be a better way.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 6:26 PM by Paschal

Hi Scott Good news for MVC. By the way any chance we can get on with the talk on the .Net Coffee Break show some time next week? My fellow developers in Ireland are waiting for your talk ;-))

Thanks for your reply

Cheers

Paschal

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 6:33 PM by Paul Marshall

Whats happened to:

1) UpdateModel - no longer accepts a FormCollection

2) AuthorizationContext - no longer has a Cancel property

3) UrlHelper - no longer accepts a ViewContext

Apart from those breaking changes, looks good. Thanks

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 6:35 PM by pure.krome

Awesome post and AWESOME news ASP.NET MVC team! <3 to the entire team!

Question Guru-Gu:

"This will check for the existence of the appropriate tokens, and prevent our HTTP-POST action method from running if they don’t match (reducing the chance of a successful CSRF attack)."

So if a site tries to do a CSRF attack (and this check picks this up), what happens? we goto a 404 page with the correct response codes? Can we customise the 'error' page? is it a 500 server error? cheers :)

(yes, i could check the code but I thought I should ask so other people will go 'ahh... ohhh. kewl, i get it!'.

cheers!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 6:43 PM by Mike

Wow, great improvements! T4 templates are a smart way to do scaffolding, this way we will probably see some scaffolding solutions on codeplex. Also the conventions are starting to look nice, just what I was hoping to see in this project.

PS. Props for using Moq, it's sooo great!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 6:50 PM by Santos Ray Victorero, II

Congratulations to you and your team.

Santos

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 7:46 PM by Cody Skidmore

You continue to make life better for your developers and inspire us.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:01 PM by ScottGu

@Barry,

>>>>> Great news.  Will there be an official release of "Scott Crazy Look"?

:-)

- Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:03 PM by Jeff

I have a few questions as well...

1) Is this considered a feature-locked release? In other words, will anything change between now and the final release?

2) This is a pretty radical departure from WebForms, but I'd like my team to start understanding it. What's the state of the documentation?

Looking forward to digging in!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:04 PM by ScottGu

@Josh,

>>>>>>> Impressive release, you and your team has worked hard on this one. One question I have, do you have a strategy to protect against CSRF GET, opposed to POST attacks? Or is your advice to follow HTTP standards and use GET requests exclusively for read-only actions?

I think for V1 the CSRF support is primarily for POST scenarios.  I generally recommend using POST for any destructive or update scenarios.  This not only protects against CSRF but also against search engines that follow links on your site.

Hope this helps,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:06 PM by ScottGu

@James,

>>>>>>> Scott.. is the RC compatible with Windows Azure out of the box?

It should work in Azure - although you'll need to update the web.config to support it.  The RC versions works fine on .NET 3.5 and 3.5 SP1 - which is what Azure supports.

Hope this helps,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:06 PM by Jarrett

Lots of great things added!  I'm glad to see that Request.IsAjaxRequest was fixed to work with jQuery.  Will make updates to BlogSvc.net.  Are there any changes to partial or medium trust support?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:11 PM by ScottGu

@YVan,

>>>>>>> A quick question, is there some guidance available on how I could "interface" this with a regular ASP.Net Web application?Just a kind of scenario where I could have the best of both worlds i.e. some pages view viewstate and regular controls and some other with the power of MVC routing for example.

Scott Hanselman has done a few blog posts on this.  Expect to see a lot more guidance/info on enabling these scenarios in the future since they will be super common.  

>>>>>>> Also, in a future post, it would good to highlight pros and cons of each technology...

Yep - we'll definitely do this.  One misperception some people have is that WebForms is going away - it definitely isn't.  We have a bunch of great new WebForms features coming out this year (including routing integration, better id and viewstate control, and more) that will be very compelling.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:13 PM by ScottGu

@Troy,

>>>>>>>> I'm specifically curious about the part where it says "when the application is running in *localhost* debug mode." Does this refer to the "debug" attribute on the web.config's compilation element? As far as I know the debug attribute may only be set to true or false, but being able to set it to "localhost" would be GREAT (though I'm not sure how that could work technically).  Also, any ETA on the source being available on CodePlex?

I just sent mail off to the team to find out!

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:14 PM by ScottGu

@Sam,

>>>>>>>> Great news but the Beta refuses to uninstall, at least on Windows 7. "There is a problem with this Windows installer package. A program run as part of the setup did not finish as expected."

Can you send me an email with more details on this issue?  We can then figure out how to get it working for you.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:16 PM by ScottGu

@Maciej,

>>>>>>>>> I am pretty sure RC introduced a bug in UrlHelper url generation code when working with ajax calls, because it tries to convert virtual path to client url by using async request path, which might be different (usually is, if executed action is on different controller) than original view path. This results with generated url strings being relative to async request path, not the original referer path, which renders them invalid in view that requested async operation.  Shouldnt url generation code take into consideration, if its executed as async request and not convert virtual path to client url for such requests?

Any chance you could ask this question on the ASP.NET MVC forums on http://forums.asp.net  I will forward your comment along to the team - but I think it might be best to loop you in directly with them on the forums (they monitor the forums pretty closely).

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:29 PM by ScottGu

@Graham,

>>>>> You know what irritates me, ping backs in comments.

Yep - they bug me too, but unfortunately I haven't found an easy way to filter this with my blog software

>>>>> But on topic, everyone on the ASP.NET MVC team, great job!  Shouldn't the CSRF check be included as standard though? (I suppose intranet sites would not need it) I would love to see the ability for this to be set in your Web.config, this would eleviate the need for a Html.AntiForgeryToken() reference on every page and the Validate command, which is extra code if you know you want all your pages using it.

I wouldn't be surprised if in the next release we have a config switch that has some options to have it output automatically by the Html.Form() helpers.  There are scenarios, though, where you don't want to have it - which is why we were worried about having it always on by default.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:31 PM by ScottGu

@Sam,

>>>>>>> Anyone else getting a Error while installing the RC?

If you can send me an email (scottgu@microsoft.com) then I can loop you in with the team to figure out what is wrong.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:33 PM by ScottGu

@Vitor,

>>>>>>>> Great Scott. And I saw you using Windows 7 (there is a Send Feedback message on window).

Yep - I've been running Win7 for a little over a week now.  Loving it!

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:37 PM by ScottGu

@Jim,

>>>>>>>> Has there been any additional functionality added to streamline passing data to MasterViewPages?  For example, say you wanted to display an html menu using data from the database.  This would need to be queried on every action.  I've read about doing this in one place with a basecontroller class but it seems like there might be a better way.

I don't know of anything specific added to the RC to enable this.  I'll see if we can up the documentation/guidance on this though.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:43 PM by Denny Ferrassoli

You guys have done an amazing job. RC is just what I needed to get started. Thanks!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 8:53 PM by Jarrett

The dialogs (such as Add Controller or Add View) do not look correct at 120dpi.  There are either scrollbars or overlapping fields.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 9:06 PM by Chris Hardy (ChrisNTR)

Great work done by the whole team :)

There's only one problem that I can see with the early release work on the mvc framework, which is that from Preview 1 people have been blogging/writing samples on how to do certain tasks with the framework. So when you're stuck on how to do a certain task and come to a solution only to find that it still has ControllerAction attributes and incorrect method names it's a little confusing to say the least - especially if you're new and still learning. I'm not really sure what can be done about this - certainly not hold back on getting it out there.

Looking forward to the big 1.0!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 9:17 PM by shiju varghese

Guru ScottGu,

Great news. Congrats for the GREAT work.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 9:19 PM by Roger Martin

Congrats on the release. I am dreading learning a whole new way of web development and will probably hold off for a while to let common patterns and solutions emerge, but it looks like this is the right way to do it.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 9:23 PM by Steve

Is there anything in my proj files that needs to be updated from Beta to RC ?

I didn't see anything significant outside of the web.config, and new MSBuild from the readme - however, I wanted to make sure my previously created Beta project would work ok -and if not, what should I add ?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 10:12 PM by Simon

Very exciting stuff.

Reading the release notes I noticed the following beta migration requirement : Update the <pages> section the Web.config file In the Views folder to match the following example. (The changed elements are in bold.)

However in my Views/web.config I have NOTHING in <pages> and I only created the template BRAND NEW last week from the beta.

other than that its perfect :)

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 10:18 PM by shiju

A tweet from scottgal - "Fun fact, ScottGu was up until 5 am this morning writing his MVC RC blog post, if you ever wondered what it takes to be a VP"

Hi ScottGu,

You are really amazing. Thanks a lot for your community supports.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 10:28 PM by Alex

Scott,

Thanks for RC.

It looks like if I want to use a class which is defined in referenced assembly as a model for a view using Add View menu command (VWD Express), the command throws an exception that it cannot load type information (here goes my class name from "Data" assembly) from "Web" assembly. Which is not surprising (the type is not in Web assembly), however is kind of disappointing, because I'd like to use types from other assemblies.

Thanks.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 10:52 PM by Rusty

WOW!  Thanks so much for making this a reality.  I have completely enjoyed using Asp.Net MVC from early preview until now.  We've had wild success building a powerful and high performance, standards compliant web application with excellent design patterns in place using your bits.  Sure, I may have been frustrated at the loss of RenderUserControl but we overcame and the code is cleaner because of it.  

A huge thanks to all on your team.  You fixed it.  I didn't think Asp.Net could be cooler than Rails, but   ..somehow...  you made it happen.

cheers

Rusty

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 11:00 PM by Ferry Chahaya

Scott,

Congratulations!  This is definately has been long awaited.

Will the download be available from Web PI  (Web Platform Installer) as well? Thanks!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, January 27, 2009 11:01 PM by Parag Kantharia

Hi Scott,

Great News shared.

I am dying to work with IronRuby and Asp.Net MVC since ages, but no good news are seen nearby.

Can you kindly make it clear for once and all that should i leave all the hopes to work with IronRuby and Asp.Net MVC or i can still keep on dreaming with this.

No news are bad news.. and thats really frustrating.

Thanks

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 12:31 AM by Josh Gough

Scott, Thanks!

I'm looking forward to feeling passionate again about development using approaches like MVC.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 2:51 AM by Raj

Scott,

Its a great news. Can you arrange for the download of demo project you have illustrated here. Thanks.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 2:56 AM by PaulBlamire

Hi Scott, I just wanted to thank you and the MVC team. Not just for the framework but for the manner in which the team has delivered it, they've really took listening to the community to a new level. I hope it's felt like as big a success within MS as it has with me and my colleagues and in the forums etc.

Thanks,

Paul

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:01 AM by ScottGu

@Paul,

>>>>>> Whats happened to:

>>>>> 1) UpdateModel - no longer accepts a FormCollection

UpdateModel accepts a ValueProvider, and there is a ToValueProvider() method on FormCollection that you can use to create one from a FormCollection. However - in general you shouldn't need to-do this.  Instead I'd recommend not specifying a ValueProvider within your Controller action and have it update using the default Request.Forms collection. For unit testing purposes, you can then set the Controller.ValueProvider property within your unit test and populate it using the ValueProvider collection class that is built into ASP.NET MVC.  You can then invoke the action method within the test and the UpdateModel() call will use the ValueProvider you've populated to set the values.

>>>>>>>> 2) AuthorizationContext - no longer has a Cancel property

>>>>>>>> 3) UrlHelper - no longer accepts a ViewContext

I'm not 100% sure on the answer to those ones.  If you can ask on the MVC forums on http://forums.asp.net the team should be able to help you with those two.

Thanks,

Scott

Apart from those breaking changes, looks good. Thanks

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:02 AM by ScottGu

@pure.krome,

>>>>>>>> So if a site tries to do a CSRF attack (and this check picks this up), what happens? we goto a 404 page with the correct response codes? Can we customise the 'error' page? is it a 500 server error? cheers :)

I haven't verified it myself, but my guess is that the attribute throws an exception. You could probably customize the error page displayed using the [HandleError] attribute.

Hope this helps,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:03 AM by Allan Rwakatungu

Sweet

I got only one problem when going throw the scenarios in the this article.

When trying to go throw the strongly typed expression for HTML/AJAX Helpers e.g. <%=Html.TextAreaFor(t=>t.Name)%>

I go the error 'System.Web.Mvc.HtmlHelper<Forms.Models.Test>' does not contain a definition for 'TextAreaFor'

What am I missing?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:04 AM by ScottGu

@Stefan,

>>>>>>> It appears that Url.RouteUrl(string routeName) returns blank values (for routes that used to work).  I was able to circumvent this problem by doing the following:

Can you post more details about this issue on the MVC forum at http://forums.asp.net?  Or alternatively send me email with a repro (scottgu@microsoft.com).

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:06 AM by ScottGu

@Jeff,

>>>>>> 1) Is this considered a feature-locked release? In other words, will anything change between now and the final release?

The feature-set now is pretty locked.  There will probably be a few small tweaks, but in general it is just last minute bug fixes now.

>>>>>>> 2) This is a pretty radical departure from WebForms, but I'd like my team to start understanding it. What's the state of the documentation?

I'm actually working on an ASP.NET MVC book right now, and will be posted it online for free.  If you wait another few weeks you'll have an end to end tutorial that covers the "why and how" ASP.NET MVC works and provides a good blue-print that you and your team will be able to use to build applications with it.

Hope this helps,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:06 AM by ScottGu

@Jarrett,

>>>>>>>> Are there any changes to partial or medium trust support?

ASP.NET MVC supports partial and medium trust scenarios.  

Hope this helps,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:12 AM by ScottGu

@Jarrett,

>>>>>>> The dialogs (such as Add Controller or Add View) do not look correct at 120dpi.  There are either scrollbars or overlapping fields.

Thanks for this bug report.  I just forwarded it onto the team to look at.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:13 AM by ScottGu

@Steve,

>>>>>>> Is there anything in my proj files that needs to be updated from Beta to RC ?

I don't believe anything changes in your project file - it is more the web.config files that need to be updated.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:17 AM by ScottGu

@Angus,

>>>>>>> Are you aware of the awesome work Rob Conery has been doing with MVC Storefront?

Definitely!  Rob's work is awesome. :-)

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:18 AM by ScottGu

@Alex,

>>>>>>>> It looks like if I want to use a class which is defined in referenced assembly as a model for a view using Add View menu command (VWD Express), the command throws an exception that it cannot load type information (here goes my class name from "Data" assembly) from "Web" assembly. Which is not surprising (the type is not in Web assembly), however is kind of disappointing, because I'd like to use types from other assemblies.

You should be able to reference a class in an external assembly, except if that assembly is in the GAC.  Can you tell us if the assembly you are trying to use is in the GAC?  If not, can you share more details (scottgu@microsoft.com) so that we can investigate?

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:19 AM by ScottGu

@Ferry,

>>>>>>>> Will the download be available from Web PI  (Web Platform Installer) as well? Thanks!

Yes - it will definitely be part of the Web PI once the V1 release ships.  I believe we'll also be updating the Web PI to point to the RC release too some point soon.  Our goal is to have everything installable via WebPI.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:20 AM by ScottGu

@Parag,

>>>>>>>>> Can you kindly make it clear for once and all that should i leave all the hopes to work with IronRuby and Asp.Net MVC or i can still keep on dreaming with this.

We are planning to support both IronPython and IronRuby with ASP.NET MVC. Unfortunately I don't have an udpdated timeline on when this will be available - but it is definitely on our roadmap.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:24 AM by ScottGu

@Allen,

>>>>>> I got only one problem when going throw the scenarios in the this article. When trying to go throw the strongly typed expression for HTML/AJAX Helpers e.g. Html.TextAreaFor(t=>t.Name) I got the error System.Web.Mvc.HtmlHelper<Forms.Models.Test> does not contain a definition for TextAreaFor. What am I missing?

You'll want to-do two things:

1) Make sure that your project is referencing the MVCFutures assembly (which is a separate download).  This is where the TextAreaFor() helper method lives.

2) Make sure you add the Microsoft.Web.Mvc namespace to the <namespaces> within the <pages> section of your web.config file.  This will cause the extension method to be automatically imported on all views.  Once you do this do a compile, then close and reopen your project.

Hope this helps,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:54 AM by dario-g

"Views without Code-Behind Files" - this is great news :)

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 4:02 AM by zano

Scott,

Routing has some bugs (like dealing with special characters).

Do you plan to release an updated version of System.Web.Routing.dll with the final version of ASP.NET?

I have also a couple of bugs with HTTP cache headers. I can't add [OutputCache(Location=OutputCacheLocation.Client, Duration=30000)] to my actions without getting an exception. The partial views are also resetting the Expires header to DateTime.Now.

Is that kind of small issues be fixed in next release?

Thanks to the team for the RC!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 6:32 AM by Mohammed Nour

Why we don't have the feature of specifying the routing configurations in the web.config file?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 7:00 AM by Bhakthan

Excellent post Scott, Congrats!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 7:12 AM by ken tucker

Nice this compiles in vb with option strict on

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 7:18 AM by Dave

The "Add View" command doesn't seem to work if the Model is a client-side Data Services Proxy class for an Entity-Framework model.

For example,

       Dim proxy As New Proxy.MyService.MyEntities(New Uri("MyDataService.svc/"))

       Dim viewData = From p In proxy.Partners Select p

       Return View(viewData)

The view that gets generated from this only shows a "PartnerID", even though there are a dozen properties on the Partner object.

   <fieldset>

       <legend>Fields</legend>

       <p>

           PartnerID:

           <%= Html.Encode(Model.PartnerID) %>

       </p>

   </fieldset>

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 7:46 AM by Steve

Link to the futures please! (I still disagree that this isn't in the install to be available...just makes it a pain for people to find it)

"Make sure that your project is referencing the MVCFutures assembly (which is a separate download).  This is where the TextAreaFor() helper method lives."

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 7:50 AM by Arkady

Thanks  :)

I have a problem with strongly typed expression in Microsoft.Web.Mvc namespace:

<%=Html.ActionLink<MvcApplication1.Controllers.HomeController>(c=>c.Index(), "Link") %> is not work more.

Method not found

"System.String System.Web.Mvc.Html.LinkExtensions.RouteLink(System.Web.Mvc.HtmlHelper, System.String, System.Web.Routing.RouteValueDictionary, System.Web.Routing.RouteValueDictionary)".

I found, you delete method

public static string RouteLink(this HtmlHelper htmlHelper, string linkText, RouteValueDictionary values, RouteValueDictionary htmlAttributes) in new version.

What to do?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 7:53 AM by yassir.2

MVC is greaaat !! too bad i can't use it :s

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 8:27 AM by Colin

Was it a concious decision that form values (that are not part of the model) are not persisted back to textboxes in the view after posting a form? If so what was the reasoning behind doing so? If not please fix this!

This is different (worse IMO) behaviour from the beta / previews.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 8:43 AM by Bill Gerold

I am having issues with the DropDownList now.

I Use dropdowns extensively through out my application adn made various helpers that return a SelectList with an Item selected.

I use the following call

<code><%=Html.DropDownList("WellST",Html.StateSelectList(ViewData.Model.WellST),  New With {.class = "ddl_Class"})%></code>

Which worked perfectly

With the new build however I get Overload resolution failed because no accessible 'DropDownList' can be called without narrowing conversion

Any ideas?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 9:10 AM by slawek

Which version of ASP.NET MVC Framework will be available with .NET 4.0 - v1 or maybe vNext?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 9:33 AM by HB

Very cool - I really like the new File ActionResult

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 9:37 AM by FilipEkberg

Haha... i just laughed when i scrolled through the pictures. This is AMAZING.

Scott and team, GREAT JOB! I am looking forward to taking asp.net mvc to my next project.

This is just lovely, this feels like an early birthday present ( birthday tomorrow ). So, THANKS! :)

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 10:39 AM by MonicaN

How can one configure or set up Spring 2.0 with ASP.NET MVC 1.0 Release Candidate

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 10:42 AM by MonicaN

How can one setup or configure Spring.Net 2.0 with ASP.NET MVC 1.0 Release Candidate or ASP.NET MVC

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 10:44 AM by MonicaN

How can one setup or configure Spring.Net 2.0 with ASP.NET MVC 1.0 Release Candidate or ASP.NET MVC

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 10:50 AM by devdave

Are you using Linq to SQL in this example?  Does this mean I can comfortably continue using Linq to SQL in my development?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 11:04 AM by ray247

Is there a step by step guide on migrating my beta MVC web app to the RC, should I just delete the code behind on the views, copy the new test cases that come with RC on the account controller, reference to the latest dlls?  What is the cleanest way to do any of these migrations?  Thanks a lot!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 11:22 AM by Allan Rwakatungu

Hullo

Been playing with this today --- Good job guys.

I dont know weather this is a bug or by design but when I try to create my own filter attribute (derived from the ActionFilterAttribute) , I get an error about the constructor not taking 0 args. On envistagation I noticed that the constructor is now protected ---- not visible to my application.

Note: The same code was working in the beta release.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 11:27 AM by Anthony

Can I use it with Mono?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 11:40 AM by Doug Wilson

Loving the RC!  

One problem for me though is that the "Add View" dialog isn't picking up my models.  It picks up lots of classes including some from my project, referenced projects and referenced assemblies, just not my models.  Do I need to do anything special to get that bit working?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 11:56 AM by d96

Scott, what are the asp.net mvc dependencies? i.e. does this require Ent Lib?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 12:04 PM by Jahedur Rahman

Nice to hear and see the features. But still one thing that I think should be added. When anybody tries to add a controller, he has to keep "controller" suffix with the file name in the popup. But it should be added automatically whether the suffix is added intentionally or not in the popup input box of controller name. Anyone can remove unintentionally the "controller" suffix.

Is this not a major problem?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 12:20 PM by Steve

I keep my controllers in a separate assembly.

The 'goto controller' and 'goto view' features do not work.

Is there a work around for this ?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 12:30 PM by Nam

Very impressive!  Thanks Scott & ASP.NET MVC team!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 12:49 PM by Bebo2345

Scott, may I have a vssettings export of your "Fonts and Colors"? Please? I really like that color scheme. The colors rock! ;-)

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 1:49 PM by David

We have developed an application, which is already in production, making its way to the hottest spot (sad I won't e there to see it) in the enterprise. I can't imagine what will happen in the community once it's officially released... Thank you!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 2:01 PM by Emad Ibrahim

Hi Scott,

I have a action filter that compresses the data and for some reason this line of code throws a null reference exception

HttpResponseBase response = filterContext.HttpContext.Response

But if I change it to

HttpResponseBase response = filterContext.Controller.ControllerContext.HttpContext.Response;

It works fine.  This was working in Beta but broke in RC1.  Any idea?

Thanks.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 2:10 PM by Feng

Any plan on releasing MVC Web Site template?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 2:29 PM by achu

View data class in the Add View dialog does not show my linq2sql classes in this build but it worked in beta1.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 2:35 PM by Vladekk

Let's hope Mono guys will make support as release approaches. MVC looks too good for many kinds of apps to continue write them in classic ASP.NET, and windows server os + hardware is too costly for my hobby projects.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:31 PM by Blake

I welcome the improvements. I was really excited about the scaffolding but was honestly hoping for more.

I was disappointed that the relationships on a model seem to be ignored. It would be awesome if the code generator could detect them and create the necessary form elements and data look ups to populate drop-downs like rails does.

I would also love to be able to scaffold whole models in one shot. For example, take an entity framework model and scaffold all the views and controllers necessary for basic crud operations, using just a single command.

Are there any plans to add these features, and if so when might we see them?

I realize I could probably grow my own, especially because of open t4 implementation of the current scaffold as you pointed out (which looks awesome btw), but this seems like something that is so rudimentary to the framework that it needs to be included.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 3:34 PM by bchance

Have a question about a breaking change with the ModelBinder. In the beta, when filling a collection it would look for a .index form field to know what indexes to process. This worked great because I could output one .index per item (order.Products.index = 1 would look for order.Products[1].<fieldname>), then when I added a new one I could use negative numbers (so orders.Products[-1].Price).

In the RC, it always starts at 0 and goes up until it cannot find any more. Besides making it harder to add, if you delete a member in the middle of your set, it will not process the rest. For example, if 3 products were output, the middle one is deleted via an AJAX call, then the whole screen is save, only the first will be created. You could also use anything for the index, they did not have to be integers.

Anyway to get the Beta functionality back, maybe flex if there is a .index? Or make some of the internal/private static methods more accessible (like DictionaryHelpers.DoesAnyKeyHavePrefix, VerifyValueUsability, CollectionHelpers.ReplaceCollection, ShouldUpdateProperty would also be useful).

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 4:21 PM by Feng

Any plan on supporting Website project type?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 4:24 PM by Steve

I kept exceptions thrown when trying to use the new 'add view'

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 4:26 PM by BSR

Whatever happened to BinaryStreamResult that was part of the MVC Futures assembly?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 4:43 PM by Syed Ahmed

I have tried to add a veiw from the Context menu of the controller. it does added the ASPX pages and it compiles with no error but during execution point i got parse error.

Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage<IEnumerable<OriScribe2.Models.Customer>>'.

Thanks,

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 6:29 PM by Steve

Scott from above

:

">>>>> 1) UpdateModel - no longer accepts a FormCollection

UpdateModel accepts a ValueProvider, and there is a ToValueProvider() method on FormCollection that you can use to create one from a FormCollection. However - in general you shouldn't need to-do this.  Instead I'd recommend not specifying a ValueProvider within your Controller action and have it update using the default Request.Forms collection. For unit testing purposes, you can then set the Controller.ValueProvider property within your unit test and populate it using the ValueProvider collection class that is built into ASP.NET MVC.  You can then invoke the action method within the test and the UpdateModel() call will use the ValueProvider you've populated to set the values."

Sorry Scott - this is very confusing what you are saying:

"I'd recommend not specifying a ValueProvider within your Controller action and have it update using the default Request.Forms collection."

I'm not, I just call updatemodel with my object and my formcollection.  What is a ValueProvider ?

Confused...

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 6:52 PM by Steve

I just went and re-tested that UpdateModel

Error in RC1 is now "The given key was not present in the dictionary."

var address = new Address();

               UpdateModel(address, new [] { "Street1", "Street2", "City", "State", "PostalCode" });

All those names are in the form.

This worked perfectly in Beta and is now failing all over the place.

I don't see how this is any different than your sample above either.

I don't pass a 'FormCollection' - didn't do it in Beta either, didn't need to.  I specified exactly what I want to get updated from the form as per previous posts on UpdateModel.

Not sure why this has changed ?  

Except I do this all over the place...  :(

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 6:58 PM by Ning

It seems that a MVC view page only has .aspx file, does everyone have idea on how to add .aspx.cs and .aspx.designer.cs files under a MVC view page?

Thanks

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 7:09 PM by Steve

I should add, my form is mapping to several objects -  is the binder unable to handle that senario.

I confirmed, all my form variables are named correctly and in the request.form collection.

That error is a mystery.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 9:05 PM by KK

Great news!!! Thanks. What is the roadmap for MVC framework?

All this is happening in a single project, not useful for many professional websites. Can we use separate projects for controllers and models while using MVC context menus?

Thanks,

KK

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, January 28, 2009 10:05 PM by hvossos

Custom Model Binders (classes which implement IModelBinder) seem to cause problems with Html Helpers (Html.TextBox).  Not sure if this is a bug or I am missing something.  If you have a model class which is populated via a custom Model Binder then used in a strongly typed view and you render an input via the Html.TextBox helper you get a nullreference exception in the System.web.mvc.htmlhelper.getmodelstatevalue method.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 1:21 AM by Kartikay Tripathi

In the beta version i have tried to use the GridView with MVC but i found it bit complex and not flexible like normal gridview.I want to know in this release client gridview is improved or not ?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 1:34 AM by Steve

Scott, I resolved my UpdateModel problems, etc...

It was a base class validator that was causing the issue, not the fantastic MVC setup  :)

I do look forward to hearing what you say about those of us that split our controller/model/web into different assemblies.

Hopefully the new GUI stuff will be able to handle that

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 1:51 AM by Vlad

Great news!!

We just start a great project and we take the ASP.NET MVC as a base framework for front end.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 2:52 AM by Akaka

Scott,

I have downloaded and tried this release, One question, Can we add code behind for view page?

I think you have mentioned that we can add server control to view page and handle page load event to bind server control such as listview.

listView1.DataSource = ViewData("Products")

listView1.DataBind()

When I hit "Show All Files" , it doesn't show up code behind file (such as Index.aspx.vb)

Thanks,

Akaka

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:14 AM by jaydeep_vishwakarma

I have been working on mvc beta framework. It is really good. But still the html controllers have limitation; like one of the controller "html Grid" is having lot of limitations. Are you looking to improve html controls in this mvc framework release?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 5:10 AM by dkarantonis

Very nice work from the asp.net MVC team! Hoping to see version 1 and documentation released soon...

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 7:57 AM by Alexander

Upload's view part:

   <% using (Html.BeginForm())

      { %>

   <h2>Select file</h2>

   <input type="file" name="uploadFile" />

   <input type="submit" value="Upload" />

   <% } %>

My controller:

public class FilesController : Controller

   {

       public ActionResult Upload(HttpPostedFileBase uploadFile)

       {

           return View();

       }

   }

After http post uploadFile is still null. Does anyone make it work?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 8:18 AM by Mike

I have to add the full namespace in the inherits attribute of the page, even if I add System.Web.Mvc in the pages element of web.config, that shouldn't be necessary right?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 8:24 AM by Mike

I see the viewcontext constructor was also cleaned up, that saves a lot of code when mocking it! Nice.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 8:28 AM by Mike

One more thing I noticed: Html.TextBox("user.name") will render an input with id=user_name and name=user.name

This is confusing, and makes it harder to make labels that are connected to the inputs.

Why did you do this?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 10:40 AM by deerchao

HtmlHelper.cs line 214:

       internal object GetModelStateValue(string key, Type destinationType) {

           ModelState modelState;

           if (ViewData.ModelState.TryGetValue(key, out modelState)) {

               //if appended by deerchao

               //other wise NullReferenceException is thorwed sometimes:

               if(modelState.Value!=null)

                   return modelState.Value.ConvertTo(destinationType, null /* culture */);

           }

           return null;

       }

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 12:56 PM by Kyle LeNeau

Thank you once again for the detailed post explaining the new features. Good ridence to code behind's in my opinion.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 1:45 PM by Russ Painter

Does this include the Dynamic Data stuff that has been in the "Futures" pack (which I haven't managed to get to work)?  I've been waiting for an official update to that.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 3:12 PM by Charles

Thank you so much.

I've an issue about the HtmlHelper. The html id generated by HtmlHelper is usually the same as the name. For example,

<% = Html.TextBox("Product.Name") %>

will output

<input type="text" name="Product.Name" id="Product.Name" />

The problem is the dot "." inside the ID will cause problem in many client javascript, like JQuery, the following selector will result "function not found" error.

$("#Product.Name")

It'll be grade if HtmlHelper can replace all "." to "_" in the Html id field by default.

Thank you

Charles

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 3:13 PM by Gareth

If I try to use the CTRL+M, CTRL+V with a controller which is not part of the website's assembly I get the message on the status bar - "The key combination is bound to command (&Add View...) which is not currently available".

My model class is also in a separate assembly.

eg

MvcTest.WebApp

MvcTest.Model

MvcTest.Controllers

I did some further tests and it works if the controller class is part of the web project (even if the model is in a separate assembly, contrary to what others comments say).

I can see why this might be hard to implement since there may be more than one web project (eg, public and admin apps) and the command wouldn't know which project you want to add it to, however it would definitely be nice to have it if it would be at all possible.

Otherwise, seems great.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:24 PM by Jason

Hello Scott,

Found a tiny little bug in Web.config, the authentication loginUrl should point to "~/Account/LogOn" instead of "~/Account/Login".  Currently in RC, any controller action with the [Authorize] attribute will get a 404 instead of the log on page.  It is a tiny problem, which can be addressed by a developer easily.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:26 PM by ScottGu

@Zano,

>>>>>>> Routing has some bugs (like dealing with special characters).

Can you post details on the issues you are seeing on the ASP.NET MVC forum at: http://forums.asp.net?  The team can then take a look at them.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:28 PM by ScottGu

@Barney,

>>>>>> However, the File helper does not take one argument - it now requires the content type.  Is there any way of using this without knowing the content type in advance?

Good question - I just sent mail to the team passing along that suggestion.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:30 PM by ScottGu

@Colin,

>>>>>> Was it a concious decision that form values (that are not part of the model) are not persisted back to textboxes in the view after posting a form? If so what was the reasoning behind doing so? If not please fix this!  This is different (worse IMO) behaviour from the beta / previews.

I checked with the team, and they said this has always been the behavior, and that the form helpers never directly accessed the Request property to retrieve posted values.  

From a separation of concerns perspective, it is best to have the UI helpers always work off the data that the Controller passes to the view - can you not pass this data via either the ViewData dictionary or a custom ViewModel object?

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:33 PM by ScottGu

@Bill,

>>>>>>>> I am having issues with the DropDownList now.  I Use dropdowns extensively through out my application adn made various helpers that return a SelectList with an Item selected. I use the following call

>>>>>>>> <code><%=Html.DropDownList("WellST",Html.StateSelectList(ViewData.Model.WellST),  New With {.class = "ddl_Class"})%></code>

>>>>>>>> Which worked perfectly.  With the new build however I get Overload resolution failed because no accessible 'DropDownList' can be called without narrowing conversion  Any ideas?

Can you have your Html.StateSelectList return a SelectList object instead of what it currently uses?  This should fix the issue.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:34 PM by ScottGu

@DevDave,

>>>>>>> Are you using Linq to SQL in this example?  Does this mean I can comfortably continue using Linq to SQL in my development?

Yep - I am using LINQ to SQL in the above examples.  LINQ to SQL works great for me.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:35 PM by ScottGu

@ray247,

>>>>>>>> Is there a step by step guide on migrating my beta MVC web app to the RC, should I just delete the code behind on the views, copy the new test cases that come with RC on the account controller, reference to the latest dlls?  What is the cleanest way to do any of these migrations?  Thanks a lot!

I'd recommend looking at the release notes.  These document the steps necessary to upgrade.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:36 PM by ScottGu

@Anthony,

>>>>>>>> Can I use it with Mono?

We are working to enable it to be used on Mono as well.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:36 PM by ScottGu

@Doug,

>>>>>>>> One problem for me though is that the "Add View" dialog isn't picking up my models.  It picks up lots of classes including some from my project, referenced projects and referenced assemblies, just not my models.  Do I need to do anything special to get that bit working?

We found a bug where if you have a class in one assembly that exposes a public property for a type that lives in a separate assembly, the scaffolding templates raise an error.  We are going to get that fixed for the final release.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:37 PM by ScottGu

@dp6,

>>>>>>> Scott, what are the asp.net mvc dependencies? i.e. does this require Ent Lib?

ASP.NET MVC requires .NET 3.5 (we recommend 3.5 SP1 - but it will work with vanilla 3.5 too).  There are no EntLib requirements (although it will work with it).

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:38 PM by ScottGu

@Jahedur,

>>>>>>>> Nice to hear and see the features. But still one thing that I think should be added. When anybody tries to add a controller, he has to keep "controller" suffix with the file name in the popup. But it should be added automatically whether the suffix is added intentionally or not in the popup input box of controller name. Anyone can remove unintentionally the "controller" suffix.

We thought showing the full name would be more discoverable and a little less magic.  The selection within the dialog is set so that you can just use the keyboard (and don't need to use the mouse to keep the Controller postfix).

Hope this helps,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:39 PM by ScottGu

@Steve,

>>>>>>> I keep my controllers in a separate assembly. The 'goto controller' and 'goto view' features do not work.

Unfortunately I'm not sure if we'll be able to enable this in V1 - but I'll forward along to the team for them to look at.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:40 PM by ScottGu

@Todd,

>>>>>>>> Where can we get the latest source code? The 21526 tag on www.codeplex.com/.../ListDownloadableCommits.aspx says DO NOT USE and the previous 17272 tag is older code.

The source has been updated on CodePlex with the RC1 source.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:41 PM by ScottGu

@Emad,

>>>>>>> I have a action filter that compresses the data and for some reason this line of code throws a null reference exception

Good question - I just forwarded this report to the team for them to look at.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:42 PM by ScottGu

@achu,

>>>>>>>> View data class in the Add View dialog does not show my linq2sql classes in this build but it worked in beta1.

Are you doing a compile after adding the classes to the project?  If you are still having problems please send me email (scottgu@microsoft.com) with more details.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:51 PM by ScottGu

@Blake,

>>>>>>> I welcome the improvements. I was really excited about the scaffolding but was honestly hoping for more.  I was disappointed that the relationships on a model seem to be ignored. It would be awesome if the code generator could detect them and create the necessary form elements and data look ups to populate drop-downs like rails does.

We debated on the scaffolding front exactly the approach to take.  One approach would have been to hard-code it with awareness of a specific ORM implementation, but in the end we decided to go a more generic approach so that the base version worked well with any class.  Having said that, we are adding a last minute feature for RTM to identify primary keys with Linq to SQL and LINQ to Entities to avoid users having to update the hyperlinks in the views for navigation.  Detecting foreign keys and automatically populating drop-downlists is something we are going to look at for the next release.

>>>>>>> I would also love to be able to scaffold whole models in one shot. For example, take an entity framework model and scaffold all the views and controllers necessary for basic crud operations, using just a single command.  Are there any plans to add these features, and if so when might we see them?

We'll be adding support for this in the future (we are working on this now).  It won't make V1, but is something we'll enable.

>>>>>>> I realize I could probably grow my own, especially because of open t4 implementation of the current scaffold as you pointed out (which looks awesome btw), but this seems like something that is so rudimentary to the framework that it needs to be included.

Ultimately we wanted to make sure we provide good base scaffolding that works in all scenarios first, and then add the more specific scaffolding support for specific ORMs. We felt this would ensure that we had the most flexibility out of the box to handle multiple scenarios.  We'll be building even more on top of it (including adding specific ORM awareness) in the future though now that we have the base support in.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:52 PM by ScottGu

@bchance,

>>>>>>>> Have a question about a breaking change with the ModelBinder. In the beta, when filling a collection it would look for a .index form field to know what indexes to process. This worked great because I could output one .index per item (order.Products.index = 1 would look for order.Products[1].<fieldname>), then when I added a new one I could use negative numbers (so orders.Products[-1].Price).  In the RC, it always starts at 0 and goes up until it cannot find any more. Besides making it harder to add, if you delete a member in the middle of your set, it will not process the rest. For example, if 3 products were output, the middle one is deleted via an AJAX call, then the whole screen is save, only the first will be created. You could also use anything for the index, they did not have to be integers.  Anyway to get the Beta functionality back, maybe flex if there is a .index? Or make some of the internal/private static methods more accessible (like DictionaryHelpers.DoesAnyKeyHavePrefix, VerifyValueUsability, CollectionHelpers.ReplaceCollection, ShouldUpdateProperty would also be useful).

Any chance you could re-post this question in the ASP.NET MVC forum on http://forums.asp.net?  I'd love for the team to be able to drill into this scenario more with you.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:53 PM by ScottGu

@Feng,

>>>>>>> Any plan on supporting Website project type?

Our built-in tool support for MVC is going to use the web application project option.  Note that this project type is now supported with the free Visual Web Developer 2008 edition (just make sure you have SP1 installed to get it).

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:53 PM by ScottGu

@BSR,

>>>>>>>> Whatever happened to BinaryStreamResult that was part of the MVC Futures assembly?

This was replaced with the new FileResult feature that is built-in to the ASP.NET MVC RC core.

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 4:55 PM by ScottGu

@Steve,

>>>>>>> I kept exceptions thrown when trying to use the new 'add view'

We found a bug where if your model class is in one assembly and exposes a public property for a type that lives in a separate assembly, the scaffolding templates raise an error.  We are going to get that fixed for the final release.

Could this be the issue you are running into?

Thanks,

Scott

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 6:53 PM by JM

You guys are geniuses.  THANK YOU VERY MUCH FOR ALL YOUR HARD WORK!!!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, January 29, 2009 11:04 PM by Anil Sistla

Hey Scott,

My VS IDE crashes when I open the MVC Project. I have VS 2008 SP1. I have MVC Beta before, uninstalled and installed MVC RC and then when I open the MVC Project that I had, the project opens and then IDE closes automatically. Any inputs that you can provide?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, January 30, 2009 3:00 AM by Areg Sarkissian

Is the following a bug in RC1?

I have:

<%= Html.ActionLink("abc","Index","Home",new{},new{_class="123"}) %>

which renders:

<a _class="123" href="./">abc</a>

how come I am seeing "_class" instead of "class" attribute in the anchor tag?

Thanks

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, January 30, 2009 3:13 AM by Goran

Thank you !!!! What settings do you have in your VS Editor. I just love the dark background.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, January 30, 2009 8:09 AM by secretGeek

Very excited about the new features, amazing work.

Unfortunately, I've had no luck getting the installer to work.

i uninstalled the previous beta first. But during install of RC i get up to 'configuring templates' step then it goes to 'removing backup files' for a moment and starts 'rolling back', telling me it didn't install properly.

In the event log i see "Installation success or error status: 1603"

When I run VS2008 (note:Standard edition) i see MVC project templates in the 'new project' dialog, but when i try to create an MVC project, i get "This template attempted to load an untrusted component. 'Microsoft.VisualStudio.Web.Extensions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

(Naturally I have screenshots of everything, etc) ;-)

cheers

lb

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, January 30, 2009 5:00 PM by secretGeek

i tried again with logging on

msiexec /i "AspNetMVCRC-setup.msi" /q /l*v mvc.log

it looks like the culprit is a failure during ngen. :-(

ExecNetFx:  Installing assembly System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35

ExecNetFx:  Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

ExecNetFx:  Error 0x8007006d: failed to allocate output string

ExecNetFx:  Error 0xffffffff: Command line returned an error.

ExecNetFx:  Error 0xffffffff: failed to execute Ngen command: C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe install "System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, January 30, 2009 5:16 PM by Evan Freeman

I love MVC!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, January 30, 2009 8:22 PM by Lack of code-behind for MVC ...

The lack of code-behind by default is a pain. I like generating my forms in the code-behind because they are compile-time checked and easier to refactor with Resharper. Consider the following example, assigning form to a string in the aspx file:

protected override void OnLoad(...)

{

   var formItems = new IFormItem[] {

       new SomeTypeOfFormItem(...),

       new OtherTypeOfFormItem(...),

       ...

   }

   form = Html.BuildForm<Controller>(c => c.Method(), "FormName", formItems);

}

Using this method seems much more maintainable. Why cut off the ability to develop our code as cleanly as possible with the most possible support from third party applications??

MVC is great, but in my opinion, removing the code-behind by default is a terrible decision.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Saturday, January 31, 2009 12:04 PM by Thomas Eyde

The Controller.UpdateModel() method provides nice error messages whenever the input value fails to be converted to the model's property type.

How to I replace the English text with, say, Norwegian ones?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Saturday, January 31, 2009 9:49 PM by Craig

What is the secret to get to the unit test for the Account Controller.  I created a new project using the template and expected to be asked if I wanted a unit test project created and I never got this dialog.  I don't see the unit tests anywhere.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Sunday, February 1, 2009 5:08 AM by jwize

I just have a question about the edit functionality and the state of the view following the simple examples provided. I click the edit and make changes, the changes persist to the database using linq as described but the original values are shown not the new values. The same query code seems to be running again and even if I set a breakpoint in the view display code which loops through displaying records creating a grid, wherein I see the correctly changed value, it doesn't show up in the display.

It is peculiar behavior to say the least.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Sunday, February 1, 2009 5:19 AM by Jaime

Sorry,nix that comment it was I who had made the mistake in my query code.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Sunday, February 1, 2009 8:13 AM by mywebarts

Hi Scott, I submitted my Design on Jan 18 for the MVC Design Contest. I never got approved on my design. Why is that? There is no information anywhere and I never received any email. I think approval should have take 1 day not more.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Sunday, February 1, 2009 9:05 PM by Ngoc

In the ASP.NET Webform, it has a special file called app_offline.htm. Will it be supported in MVC?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 2, 2009 11:48 AM by Alex Dresko

Hi Scott,

Dunno if you're still reading the comments on this thread, but this is the only way I could find to contact you on your blog. Besides the fact that it's difficult to find a way to send you a comment NOT related to your blog, I simply wanted to point out that it would be really helpful if you could somehow show the date/time of your blog posts at the top of each post. There's nothing worse than reading an entire article just to find out it's a year old. And it sucks to have to scroll down to find the date/time which is somewhere between your giant posts and the hundreds of comments that follow.

Thanks for taking time to consider these improvements!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 2, 2009 2:56 PM by Bohms27

I am new to MVC and am looking at this line of code in an old program that I am trying to update. I have a problem with the dropdownlist and binding the data to it.

Html.DropDownList("Categories", ViewData["Categories"])

It does not like this ViewData object. What can I do to fix this?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 2, 2009 3:01 PM by Bohms27

I am new to MVC and am looking at this line of code in an old program that I am trying to update. I have a problem with the dropdownlist and binding the data to it.

Html.DropDownList("Categories", ViewData["Categories"])

It does not like this ViewData object. What can I do to fix this?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 2, 2009 4:52 PM by charles

Can't wait for the final 1.0 release. Thanks to you and the team for all of your hard work.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 2, 2009 8:15 PM by EricTN

Thanks for another incredibly rich ASP.NET MVC release.  It's looking like the fact that you include JQuery 1.2.6 with the RC and will move to 1.3.x in the v1.0 release was some helpful timing.  I've been reading of people having issues and encountering bugs with the current rev of JQuery 1.3.x.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 2, 2009 9:07 PM by match

where i can download the ASP.NET MVC 1.0 Release Candidate source code!

thanks

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 2, 2009 10:11 PM by Fandi

Hi Scott,

I tried to include the changes in the project file to Compile the Views (add AspNetCompiler task on AfterBuild target), and yes it works as expected when I Build through Visual Studio.

However, it breaks when I build using Team Build, with following error:

/temp/global.asax(1): error ASPPARSE: Could not load type 'WebClient.MvcApplication'.

It's definitely not something to do with my build server because when I tried to open Visual Studio on the server and build it from there, it also builds fine.

Can you please let me know if it is a known issue, and if there's any workaround?

Thanks

Fandi

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, February 3, 2009 11:13 AM by Steve

Scott:

"@Steve,

>>>>>>> I keep my controllers in a separate assembly. The 'goto controller' and 'goto view' features do not work.

Unfortunately I'm not sure if we'll be able to enable this in V1 - but I'll forward along to the team for them to look at.

Thanks,

Scott"

I know you know this...  :)  But a majority of applications built with mvc will have their controllers separated from the web application.  It's not even good architecture IMO to not provide this.  Especially anything larger than mom and pop shops.

Monorail provided a configuration entry to define the assembly with the controllers.  

This is very short-sided of the development team to think that everyone will have the controllers embedded in the web application.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, February 3, 2009 11:43 AM by Rick Schott

Awesome write up, thanks!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, February 4, 2009 2:16 AM by softengg.saurabh

Hi Scott...

I want to Load a UserControl from my Views Folder.

in Old Release it Loads like

<%= RenderUserControl("~/Views/Home/TestUC.ascx")%>

in RC1 i don't know how u Load a UserControl

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, February 4, 2009 2:39 AM by softengg.saurabh

Well ......i got the Answer.......

it should be

<% Html.RenderPartial("~/Views/Home/TestUC.ascx", m); %>

thanx for RC Refresh

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, February 4, 2009 8:58 AM by gporras

I´m getting the same error of SecretGeek...

What can i do?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, February 5, 2009 1:51 AM by CantInstall

I have the similar problem to what SecretGeek mentioned earlier. It says Out of memory in the log but I have plenty. I have VS 2008 team suite, .Net 3.5 SP1, Vista Ultimate if that helps.

ExecNetFx:  Microsoft (R) CLR Native Image Generator - Version 2.0.50727.3053

ExecNetFx:  Copyright (c) Microsoft Corporation.  All rights reserved.

ExecNetFx:  Installing assembly System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35

ExecNetFx:  Out Of Memory

ExecNetFx:  Error 0x8007006d: failed to allocate output string

ExecNetFx:  Error 0xffffffff: Command line returned an error.

ExecNetFx:  Error 0xffffffff: failed to execute Ngen command: c:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe install "System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, February 5, 2009 2:12 AM by Saurabh

Hi Scott....

I have one question.....why there is two web.config files (one is at rootfolder and anthor is in "Views" folder).

Kind Regards,

Saurabh

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, February 5, 2009 11:24 AM by Alex

Where can I find the new MSBuild task?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, February 5, 2009 12:36 PM by wsoangel

great work,thank you

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, February 5, 2009 2:22 PM by Noraha

Sorry, this is not the right place, but the other blog on web deployment project is closed and I found nothing on it after hours of searching the net. OK here we go, this is the question:

Creating a Web Site Project (not a Web Application Project) and adding a Web Deployment Project you can deploy your site with a single assembly and all the content files. These content files can be modified by a third party in a working environment (just include the bin folder) without getting your sourcecode. This is a cool workflow till you want to include those content files (ascx/aspx) back to your website solution. It doesn't work, as the deployment project removes in the page directive the CodeFile and ads a class in the inherit attribute. OK, I could write a program that reverts these modifications in those files back. ...but I can't imagine that this is the right way. Please help!

Regards

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, February 6, 2009 7:52 AM by Bulbul

I had created an application using MVC Beta.

Now the client came to me saying Migrate it and now when the fields are empty and user clicks submit it simple throws Null reference exception.

I tried passing data from controller into my View Data ["xyz"] but still it throws null reference exception.

I am not able to figure out why?

Can anybody help?

In Beta it used to show the validation message now it doesnt.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, February 6, 2009 9:20 AM by Trevor

Whither the t4 templates?

After installing RC, I can't find the t4 templates.  'The directory C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC\CodeTemplates' does not exist on my system.  I've also downloaded the source from codeplex and again no templates.  I would like the source to customize and make my own templates.

Help!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, February 6, 2009 7:36 PM by Trevor

@Steve:  I really don't think the majority of web apps will have the controllers in a separate dll.  I do think this is a good design for most apps.  Now for larger apps, I think divided into areas, would be separate dlls, but still would be able to function as separate units.  In most cases, I cannot see a good reason for this separation and in fact think it is a bad idea.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Saturday, February 7, 2009 10:34 AM by trendbender

thx, good reviews, i like MVC :)

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Sunday, February 8, 2009 11:01 PM by defaultexp

nice article. thanks

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 9, 2009 5:04 AM by yolanda0409

Nice article! Thank you!

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, February 9, 2009 9:47 AM by Robert Johnson

Very helpful. I'm just getting started with ASP.NET MVC, and this article has given me some pointers on the exact scenarios that I am looking to implement.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, February 10, 2009 7:23 PM by simeyla

any chance we'll get the OPTIONAL ability to add codebehind for a view as we create a new one? i'm thinking just an extra checkbox. its quite a pain to create one manually. getting the IDE to correctly link the files and remember to change all the right bits and pieces.

here's my exhaustive list of reasons why i want it : stackoverflow.com/.../527189

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, February 11, 2009 9:15 AM by Jose P

This may not be the place to ask this questions, but I can't figure out where. I am trying to find out how to access ActionLink<TModel> HtmlHelper. I downloaded the RC 1, also the RC Futures assembly, added the namespace Microsoft.Web.Mvc.Controls. And all I get is ActionLink(). You said that the team will iterate over these for a while, does that mean it's not in the futures assembly either? Maybe I'm missing something obvious.

Thanks in advance.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, February 11, 2009 11:17 PM by Mel

Why is it that when i created a new MVC web content the code behind was not created only the aspx?... it looks like the MvcRC is different from the Mvc Beta version... it's very quite strange now  i can't get the ViewData.Model when I try to inhirit the viewpage and it give me an error Html.Encode(Model.id) can not find the context when infact i already import this class <%@ Import Namespace="System.Web.Mvc.Html" %>

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, February 13, 2009 11:46 AM by ERolnicki

would it be possible to extract an IHtmlHelper interface?  the reason I ask this, is it would be really great to be able to have an extension method written as so:

in any given view, with regards to user permissions:  <%=Html.ForPermission(userPerms).TextBox("blahblah")%>

then, instead of having to use ugly if statements in our controllers to route an authorized user to an alternate view, we could just have the view dictate which elements to display, based upon userPerms sent via the controller.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, February 18, 2009 8:53 AM by avalutions

I'm sad, yet happy, to say I have finally jumped off the MVC bandwagon.  I have been following and using it in a couple of development projects since Preview 1, but the bottom line is, it still takes too long to do anything in this framework.  If you want just a straight-forward, data-entry application, well jump right on, but if you want control over your application and need a little spunk and power, please save yourself time and use something like Silverlight or webforms instead.  MVC has its [limited] uses but please watch your step and realize how much work will go into your application.  You would think with how much time was put into this project they would realize people need more UI functionality than a couple of HTML helpers...where's the grid with the ability to arrange columns, sort, etc without a major hack and a dozen JavaScript files?  Sorry Scott, I really was right there with you on this one, but maybe my hopes were too high for RC1.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, February 18, 2009 10:43 AM by PeterO

Hi Scott,

How does MVC plan to handle localization, especially of  View resources?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, February 20, 2009 2:28 AM by Tiendq

We're building new website with MVC, most of UI elements will be implemented as user controls for reusing in other projects. But I've seen no article or tutorial about how to create and use views, user controls, as well as controllers in separate assemblies. Does MVC support it for now?

Thanks,

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, February 20, 2009 5:38 AM by camarade

I have the same problem as Fandi.

(/temp/global.asax(1): error ASPPARSE: Could not load type 'WebClient.MvcApplication'.)

Is there any way to resolve it?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, February 20, 2009 5:54 AM by camarade

Fandi,

I understood what's wrong with AspNetCompiler.

It's a well known problem. It's because Asp.Net compiler can't find the binaries.

Change output path in your web project.

For example:

<OutputPath Condition=" '$(TeamBuildOutDir)'=='' ">.\Release</OutputPath>

<OutputPath Condition=" '$(TeamBuildOutDir)'!='' ">$(TeamBuildOutDir)WebDeploy\</OutputPath>

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Saturday, February 21, 2009 1:24 PM by James

Hi Scott,

With you example: "When a user attempts to create a Product with invalid Product property values (for example: a string “Bogus” instead of a valid Decimal value), the form will redisplay and flag the invalid input elements in red", it doesn't seem to set a default error message for showing in the validation summary - instead leaving it blank against the item in the ModelState. Is there any way of setting this message such as "Please enter a valid decimal value?"

Thanks

James

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Sunday, February 22, 2009 5:08 PM by Pietro Roberto Minali

Excuse me, my English is very poor.

...the fieldName is hard coded  in the HtmlHelper class...

not "strongly typed"

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, February 24, 2009 3:41 AM by Monaiks

Can anyone tell me what happened to ComponentController?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, February 24, 2009 12:46 PM by nitroxn

Controls for ASP.net MVC like Rich faces for JSF?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, February 26, 2009 5:22 AM by Margo

Thanks!!

Article is usefull !

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, February 27, 2009 11:17 AM by Adam

Hi Scott.

Could <%= Html.ValidationMessage() %> be made to work with input "id" aswell as "name". There are scenarios where you might want items a grid to always be editable (e.g. quantity on an inventory list or a shopping cart page.) Also will there be any 'data-pager' / 'data-sort' helpers for LINQ in the final release?

I understand you can write custom code, but these seem too fundamental to miss?!

Best Regards.

Adam.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Sunday, March 1, 2009 11:12 AM by Saeed Bidarang

Scott Gu : " We expect to ship the final ASP.NET MVC 1.0 release next month"

Hey Scott,

Thanks for your useful articles. and also for information about MVC Technology!

But the question is , what happened to you and MVC ? There aren't any posts of you during the February, And I wanted to Say, Me, my team and of course a lot of other developers are fully worry about you and MVC, So please Keep us inform! ;-)

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, March 3, 2009 8:36 PM by myjunc

I am hoping that ASP.NET MVC final release is shipped very very soon

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Wednesday, March 4, 2009 11:36 AM by Eduardo

Migrating from Beta to RC1

Someone had this problem?

I've installed MVC RC1 and intend to change the beta notation for no code behind views:

     Inherits="System.Web.Mvc.ViewPage`1[[Namespace.Class, Assembly]]"

to the new and cleaner syntaxis, and I have this error:

Parser Error

Could not load type 'System.Web.Mvc.ViewPage<Namespace.Class>'

I have to remark that on a new clean project the syntaxis works ok.

Any ideas?

Thanks

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Thursday, March 5, 2009 10:35 AM by tobias123

hi scott,

today, i read all your MVC tagged blog posts. in this one you said the MVC framework now support views using the expression based syntax (+ intellisense) as well as the the string base approach (www.scottgu.com/.../step25.png):

a) i wonder why are you using the string based approach in the scaffolding template generated views? why not using the expression based one for scaffolding now?

thanks, tob

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, March 9, 2009 1:44 AM by hemant.kamalakar

A very nice article.

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Monday, March 9, 2009 10:04 AM by Joe

Scott,

What's the word on the final release of 1.0?  I tested RC2 and like it, but I have to get my team and servers upgraded.  If 1.0 is going to be released in a few days/week, should I just wait?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Tuesday, March 17, 2009 10:29 AM by tibo

Hello,

someone know when the final release will be available ?

# re: ASP.NET MVC 1.0 Release Candidate Now Available

Friday, March 20, 2009 10:25 AM by paskos

Almost 10 years after Struts MVC...nice ! :)